Methods and systems for image processing

ABSTRACT

A method for image processing is provided. The method may include: obtaining a plurality of frames, each of the plurality of frames comprising a plurality of pixels; determining, based on the plurality of frames, whether a current frame of the plurality of frames comprises a moving object; in response to determining that the current frame includes no moving object, obtaining a first count of frames, and generating a target image by superimposing the first count of frames; in response to determining that the current frame includes a moving object, obtaining a second count of frames, and generating the target image by superimposing the second count of frames.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2019/091366, filed on Jun. 14, 2019, which claims priority toChinese Patent Application No. 201810614685.7, filed on Jun. 14, 2018,and Chinese Patent Application No. 201811480295.1, filed on Dec. 5,2018, the contents of each of which are hereby incorporated by referencein its entirety.

TECHNICAL HELD

The present disclosure generally relates to image technology, and moreparticularly to systems and methods for thread tuning and imageprocessing.

BACKGROUND

In real-time acquisition of fluoroscopic images, a plurality of imageframes are superimposed to reduce image noise. However, if the pluralityof frames include one or more moving objects, the superimposing processof frames can induce motion artifacts, which can affect the quality of atarget image that is generated based on the frames. If the superimposingprocess of the frames is omitted, a relatively high level of noise mayexist in the target image, which may affect the clarity of the targetimage. Therefore, it is desirable to provide methods and systems forprocessing images effectively, removing or reducing motion artifacts,removing or reducing noise, and improving image clarity.

Because a plurality of frames may be processed in the acquisition offluoroscopic images, multi-threading technology can be used to improvethe processing efficiency. However, if the count of threads exceeds thecount of cores of a processing device that performs the threads, thepreemption of the processor resources may occur, inducing the processingtime of each thread to be increased. The performance of the threads canbe improved through thread tuning. In thread tuning, the computationlload of each thread may need to be repeatedly modified or adjusted tosatisfy one or more corresponding constraint rules, which can affect theprocessing efficiency of thread tuning. Therefore, it is desirable toprovide methods and systems for tuning threads (e.g., of an imageprocessing program) more efficiently.

SUMMARY

In one aspect of the present disclosure, a method for image processingis provided. The method may include one or more of the followingoperations: obtaining a plurality of frames, each of the plurality offrames comprising a plurality of pixels; determining, based on theplurality of frames, whether a current frame of the plurality of framescomprises a moving object; in response to determining that the currentframe includes no moving object, obtaining a first count of frames;generating a target image by superimposing the first count of frames; inresponse to determining that the current frame includes a moving object,obtaining a second count of frames; and generating the target image bysuperimposing the second count of frames.

In another aspect of the present disclosure, a method for thread tuningis provided. The method may include one or more of the followingoperations: obtaining a predetermined number of initial threads;testing, under each of one or more distribution modes, a firstprocessing time for the initial threads in a parallel asynchronousprocessing mode; determining a longest first processing timecorresponding to a target distribution mode of the one or moredistribution modes; adjusting, under the target distribution mode basedon one or more constraint rules, the first processing time associatedwith the initial threads in the parallel asynchronous processing mode;determining a second processing time for each adjusted initial thread ina single thread mode; identifying a thread tuning threshold associatedwith each initial thread based on the second processing time; obtainingan application program including the predetermined number of targetthreads, each target thread of the predetermined number of targetthreads corresponding to a respective initial thread; and tuning eachtarget thread under the single thread mode based on a correspondingthread tuning threshold associated with a corresponding initial thread.

In another aspect of the present disclosure, a method for thread tuningis provided. The method may include one or more of the followingoperations: obtaining a predetermined number of initial threadsassociated with an image processing program; testing, under each of oneor more distribution modes, a first processing time for the initialthreads in a parallel asynchronous processing mode; determining alongest first processing time corresponding to a target distributionmode of the one or more distribution modes; adjusting, based on one ormore constraint rules, the first processing time associated with theinitial threads under the target distribution mode in the parallelasynchronous processing mode; determining a second processing time foreach adjusted initial thread in a single thread mode; identifying athread tuning threshold associated with each initial thread based on thesecond processing time; obtaining a predetermined number of targetthreads of the image processing program, the target threads comprising afirst thread for processing an image frame at a first frame rate and asecond thread for processing the image frame at a second frame rate,each target thread of the predetermined number of target threadscorresponding to a respective initial thread; and obtaining an adjustedimage processing program by tuning the each target thread under thesingle thread mode based on a corresponding thread tuning thresholdassociated with a corresponding initial thread.

In another aspect of the present disclosure, a system for imageprocessing is provided. The system may include at least one storagedevice storing a set of instructions; and at least one processor incommunication with the storage device, wherein when executing the set ofinstructions, the at least one processor may be configured to cause thesystem to perform one or more of the following operations: obtaining aplurality of frames, each of the plurality of frames comprising aplurality of pixels; determining, based on the plurality of frames,whether a current frame of the plurality of frames comprises a movingobject; in response to determining that the current frame includes nomoving object, obtaining a first count of frames; generating a targetimage by superimposing the first count of frames; in response todetermining that the current frame includes a moving object, obtaining asecond count of frames; and generating the target image by superimposingthe second count of frames.

In another aspect of the present disclosure, a system for thread tuningis provided. The system may include at least one storage device storinga set of instructions; and at least one processor in communication withthe storage device, wherein when executing the set of instructions, theat least one processor may be configured to cause the system to performone or more of the following operations: obtaining a predeterminednumber of initial threads; testing, under each of one or moredistribution modes, a first processing time for the initial threads in aparallel asynchronous processing mode; determining a longest firstprocessing time corresponding to a target distribution mode of the oneor more distribution modes; adjusting, under the target distributionmode based on one or more constraint rules, the first processing timeassociated with the initial threads in the parallel asynchronousprocessing mode; determining a second processing time for each adjustedinitial thread in a single thread mode; identifying a thread tuningthreshold associated with each initial thread based on the secondprocessing time; obtaining an application program including thepredetermined number of target threads, each target thread of thepredetermined number of target threads corresponding to a respectiveinitial thread; and tuning each target thread under the single threadmode based on a corresponding thread tuning threshold associated with acorresponding initial thread.

In another aspect of the present disclosure, a system for thread tuningis provided. The system may include at least one storage device storinga set of instructions; and at least one processor in communication withthe storage device, wherein when executing the set of instructions, theat least one processor may be configured to cause the system to performone or more of the following operations: obtaining a predeterminednumber of initial threads associated with an image processing program;testing, under each of one or more distribution modes, a firstprocessing time for the initial threads in a parallel asynchronousprocessing mode; determining a longest first processing timecorresponding to a target distribution mode of the one or moredistribution modes; adjusting, based on one or more constraint rules,the first processing time associated with the initial threads under thetarget distribution mode in the parallel asynchronous processing mode;determining a second processing time for each adjusted initial thread ina single thread mode; identifying a thread tuning threshold associatedwith each initial thread based on the second processing time; obtaininga predetermined number of target threads of the image processingprogram, the target threads comprising a first thread for processing animage frame at a first frame rate and a second thread for processing theimage frame at a second frame rate, each target thread of thepredetermined number of target threads corresponding to a respectiveinitial thread; and obtaining an adjusted image processing program bytuning the each target thread under the single thread mode based on acorresponding thread tuning threshold associated with a correspondinginitial thread.

In another aspect of the present disclosure, a system is provided. Thesystem may include an image acquisition module configured to obtain aplurality of frames, each of the plurality of frames comprising aplurality of pixels; a tracing module configured to determine, based onthe plurality of frames, whether a current frame of the plurality offrames comprises a moving object; and a blur removal module configuredto in response to determining that the current frame includes no movingobject, obtain a first count of frames, and generate a target image bysuperimposing the first count of frames; and in response to determiningthat the current frame includes a moving object, obtain a second countof frames, and generate the target image by superimposing the secondcount of frames.

In another aspect of the present disclosure, a system is provided. Thesystem may include an obtaining module configured to obtain apredetermined number of initial threads; a testing module configured totest, under each of one or more distribution modes, a first processingtime for the initial threads in a parallel asynchronous processing mode;an adjustment module configured to determine a longest first processingtime corresponding to a target distribution mode of the one or moredistribution modes, and adjust, under the target distribution mode basedon one or more constraint rules, the first processing time associatedwith the initial threads in the parallel asynchronous processing mode;and a determination module configured to determine a second processingtime for each adjusted initial thread in a single thread mode, andidentify a thread tuning threshold associated with each initial threadbased on the second processing time. The obtaining module may be furtherconfigured to obtain an application program including the predeterminednumber of target threads, each target thread of the predetermined numberof target threads corresponding to a respective initial thread. Thesystem may further include a tuning module configured to tune eachtarget thread under the single thread mode based on a correspondingthread tuning threshold associated with a corresponding initial thread.

In another aspect of the present disclosure, a system is provided. Thesystem may include an obtaining module configured to obtain apredetermined number of initial threads associated with an imageprocessing program; a testing module configured to test, under each ofone or more distribution modes, a first processing time for the initialthreads in a parallel asynchronous processing mode; an adjustment moduleconfigured to determine a longest first processing time corresponding toa target distribution mode of the one or more distribution modes, andadjust, based on one or more constraint rules, the first processing timeassociated with the initial threads under the target distribution modein the parallel asynchronous processing mode; and a determination moduleconfigured to determine a second processing time for each adjustedinitial thread in a single thread mode, and identify a thread tuningthreshold associated with each initial thread based on the secondprocessing time. The obtaining module may be further configured toobtain a predetermined number of target threads of the image processingprogram, the target threads comprising a first thread for processing animage frame at a first frame rate and a second thread for processing theimage frame at a second frame rate, each target thread of thepredetermined number of target threads corresponding to a respectiveinitial thread. The system may further include a tuning moduleconfigured to obtain an adjusted image processing program by tuning theeach target thread under the single thread mode based on a correspondingthread tuning threshold associated with a corresponding initial thread.

In another aspect of the present disclosure, a non-transitory computerreadable medium storing instructions is provided. The instructions, whenexecuted by at least one processor, may cause the at least one processorto implement a method including: obtaining a plurality of frames, eachof the plurality of frames comprising a plurality of pixels;determining, based on the plurality of frames, whether a current frameof the plurality of frames comprises a moving object; in response todetermining that the current frame includes no moving object, obtaininga first count of frames; generating a target image by superimposing thefirst count of frames; in response to determining that the current frameincludes a moving object, obtaining a second count of frames; andgenerating the target image by superimposing the second count of frames

In another aspect of the present disclosure, a non-transitory computerreadable medium storing instructions is provided. The instructions, whenexecuted by at least one processor, may cause the at least one processorto implement a method including: obtaining a predetermined number ofinitial threads; testing, under each of one or more distribution modes,a first processing time for the initial threads in a parallelasynchronous processing mode; determining a longest first processingtime corresponding to a target distribution mode of the one or moredistribution modes; adjusting, under the target distribution mode basedon one or more constraint rules, the first processing time associatedwith the initial threads in the parallel asynchronous processing mode;determining a second processing time for each adjusted initial thread ina single thread mode; identifying a thread tuning threshold associatedwith each initial thread based on the second processing time; obtainingan application program including the predetermined number of targetthreads, each target thread of the predetermined number of targetthreads corresponding to a respective initial thread; and tuning eachtarget thread under the single thread mode based on a correspondingthread tuning threshold associated with a corresponding initial thread.

In another aspect of the present disclosure, a non-transitory computerreadable medium storing instructions is provided. The instructions, whenexecuted by at least one processor, may cause the at least one processorto implement a method including: obtaining a predetermined number ofinitial threads associated with an image processing program; testing,under each of one or more distribution modes, a first processing timefor the initial threads in a parallel asynchronous processing mode;determining a longest first processing time corresponding to a targetdistribution mode of the one or more distribution modes; adjusting,based on one or more constraint rules, the first processing timeassociated with the initial threads under the target distribution modein the parallel asynchronous processing mode; determining a secondprocessing time for each adjusted initial thread in a single threadmode; identifying a thread tuning threshold associated with each initialthread based on the second processing time; obtaining a predeterminednumber of target threads of the image processing program, the targetthreads comprising a first thread for processing an image frame at afirst frame rate and a second thread for processing the image frame at asecond frame rate, each target thread of the predetermined number oftarget threads corresponding to a respective initial thread; andobtaining an adjusted image processing program by tuning the each targetthread under the single thread mode based on a corresponding threadtuning threshold associated with a corresponding initial thread.

Additional features will be set forth in part in the description whichfollows, and in part will become apparent to those skilled in the artupon examination of the following and the accompanying drawings or maybe learned by production or operation of the examples. The features ofthe present disclosure may be realized and attained by practice or useof various aspects of the methodologies, instrumentalities andcombinations set forth in the detailed examples discussed below

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is further described in terms of exemplaryembodiments. These exemplary embodiments are described in detail withreference to the drawings. These embodiments are non-limiting exemplaryembodiments, in which like reference numerals represent similarstructures throughout the several views of the drawings, and wherein:

FIG. 1 is a schematic diagram illustrating an exemplary image processingsystem according to some embodiments of the present disclosure;

FIG. 2 is a schematic diagram illustrating exemplary hardware and/orsoftware components of an exemplary computing device on which theprocessing device may be implemented according to some embodiments ofthe present disclosure;

FIG. 3 is a schematic diagram illustrating exemplary hardware and/orsoftware components of an exemplary mobile device on which the terminalmay be implemented according to some embodiments of the presentdisclosure;

FIG. 4 is a flowchart illustrating an exemplary process for threadtuning according to sonic embodiments of the present disclosure,

FIG. 5 is a flowchart illustrating an exemplary process for adjustingthe processing time(s) of the initial thread(s) according to someembodiments of the present disclosure;

FIG. 6 is a flowchart illustrating an exemplary process for threadtuning according to some embodiments of the present disclosure;

FIG. 7 is a block diagram illustrating an exemplary processing deviceaccording to some embodiments of the present disclosure;

FIG. 8 is a diagram illustrating an exemplary computing device accordingto some embodiments of the present disclosure;

FIG. 9 is a flowchart illustrating an exemplary process for imageprocessing according to some embodiments of the present disclosure;

FIG. 10 is a flowchart illustrating an exemplary process for detectingwhether a current frame includes a motion according to some embodimentsof the present disclosure;

FIG. 11 is a flowchart illustrating an exemplary process for determiningwhether the current frame includes a moving object according to someembodiments of the present disclosure;

FIG. 12 is a flowchart illustrating an exemplary process for adjustingthe second count according to some embodiments of the presentdisclosure;

FIG. 13 is a flowchart illustrating an exemplary process for adjustingthe second frame rate according to some embodiments of the presentdisclosure;

FIG. 14 is a block diagram illustrating an exemplary processing deviceaccording to some embodiments of the present disclosure;

FIG. 15 is a block diagram illustrating an exemplary computing deviceaccording to some embodiments of the present disclosure; and

FIG. 16 is a flowchart illustrating an exemplary process for tuningthreads of an image processing program according to some embodiments ofthe present disclosure.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth by way of examples in order to provide a thorough understanding ofthe relevant disclosure. However, it should be apparent to those skilledin the art that the present disclosure may be practiced without suchdetails. In other instances, well-known methods, procedures, systems,components, and/or circuitry have been described at a relativelyhigh-level, without detail, in order to avoid unnecessarily obscuringaspects of the present disclosure. Various modifications to thedisclosed embodiments will be readily apparent to those skilled in theart, and the general principles defined herein may be applied to otherembodiments and applications without departing from the spirit and scopeof the present disclosure. Thus, the present disclosure is not limitedto the embodiments shown, but to be accorded the widest scope consistentwith the claims.

The terminology used herein is for the purpose of describing particularexample embodiments only and is not intended to be limiting. As usedherein, the singular forms “a” “an,” and “the” may be intended toinclude the plural forms as well, unless the context clearly indicatesotherwise, It will be further understood that the terms “comprise,”“comprises,” and/or “comprising,” “include,” “includes,” and/or“including,” when used in this specification, specify the presence ofstated features, integers, steps, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps, operations, elements, components,and/or groups thereof.

It will be understood that the term “system,” “engine,” “unit,”“module,” and/or “block” used herein are one method to distinguishdifferent components, elements, parts, section or assembly of differentlevel in ascending order. However, the terms may be displaced by anotherexpression if they achieve the same purpose.

Generally, the word “module,” “unit,” or “block,” as used herein, refersto logic embodied in hardware or firmware, or to a collection ofsoftware instructions. A module, a unit, or a block described herein maybe implemented as software and/or hardware and may be stored in any typeof non-transitory computer-readable medium or another storage device. Insome embodiments, a software module/unit/block may be compiled andlinked into an executable program. It will be appreciated that softwaremodules can be callable from other modules/units/blocks or fromthemselves, and/or may be invoked in response to detected events orinterrupts. Software modules/units/blocks configured for execution oncomputing devices (e.g., processor 210 as illustrated in FIG. 2) may beprovided on a computer-readable medium, such as a compact disc, adigital video disc, a flash drive, a magnetic disc, or any othertangible medium, or as a digital download (and can be originally storedin a compressed or installable format that needs installation,decompression, or decryption prior to execution). Such software code maybe stored, partially or fully, on a storage device of the executingcomputing device, for execution by the computing device. Softwareinstructions may be embedded in firmware, such as an EPROM. It will befurther appreciated that hardware modules/units/blocks may be includedin connected logic components, such as gates and flip-flops, and/or canbe included of programmable units, such as programmable gate arrays orprocessors. The modules/units/blocks or computing device functionalitydescribed herein may be implemented as software modules/units/blocks,but may be represented in hardware or firmware. In general, themodules/units/blocks described herein refer to logicalmodules/units/blocks that may be combined with othermodules/units/blocks or divided into sub-modules/sub-units/sub-blocksdespite their physical organization or storage. The description may beapplicable to a system, an engine, or a portion thereof.

It will be understood that when a unit, engine, module or block isreferred to as being “on,” “connected to,” or “coupled to,” anotherunit, engine, module, or block, it may be directly on, connected orcoupled to, or communicate with the other unit, engine, module, orblock, or an intervening unit, engine, module, or block may be present,unless the context clearly indicates otherwise. As used herein, the term“and/or” includes any and all combinations of one or more of theassociated listed items.

These and other features, and characteristics of the present disclosure,as well as the methods of operation and functions of the relatedelements of structure and the combination of parts and economies ofmanufacture, may become more apparent upon consideration of thefollowing description with reference to the accompanying drawings, allof which form a part of this disclosure. It is to be expresslyunderstood, however, that the drawings are for the purpose ofillustration and description only and are not intended to limit thescope of the present disclosure. It is understood that the drawings arenot to scale.

The flowcharts used in the present disclosure illustrate operations thatsystems implement according to some embodiments of the presentdisclosure. It is to be expressly understood, the operations of theflowcharts may be implemented not in order. Conversely, the operationsmay be implemented in inverted order, or simultaneously. Moreover, oneor more other operations may be added to the flowcharts. One or moreoperations may be removed from the flowcharts.

One aspect of the present disclosure relates to methods, systems,computing devices, and computer readable storage mediums for threadtuning, which may identify a thread tuning threshold associated witheach initial thread (or each adjusted initial thread), obtain anapplication program including a plurality of target threads, and tuneeach target thread under a single thread mode based on the correspondingthread tuning threshold. Each initial thread may be adjusted, based onone or more constraint rules, under a target distribution mode in theparallel asynchronous processing mode. The thread tuning threshold maybe determined according to the processing time of each adjusted initialthread in the single thread mode, and the processing time may beadjusted under the distribution mode with the lowest load performance,and based on constraint rule(s). The performances of the distributionmodes and the situation that a plurality of threads may compete for theCPU cores may be considered. Therefore, the thread tuning threshold(s)may represent the most appropriate processing time of the targetthread(s), and can serve as performance parameter(s) for thread tuning.The processing time of a target thread can be directly compared withcorresponding thread tuning threshold, and thus, unnecessary repeatedtuning can be eliminated, and accordingly, the processing efficiency ofmulti-thread tuning can be improved.

Another aspect of the present disclosure relates to methods, systems,computing devices, and computer readable storage mediums for imageprocessing, which may obtain a plurality of frames, detect whether acurrent frame of the plurality of frames includes a motion, and/ordetermine (or identify) whether the current frame of the plurality offrames includes a moving object. If it is detected that the currentframe of the plurality of frames includes a moving object, a secondcount of frames may be acquired at a second frame rate, and/or a targetimage may be generated by superimposing the second count of frames.Otherwise, a first count of frames may be acquired at a first framerate, and/or a target image may be generated by superimposing the firstcount of frames. The second count may be less than the first count. Thesecond frame rate may be larger than the first frame rate. Throughadjusting the count of frames to be acquired and/or the frame rate,based on whether the current frame includes a moving object, thesuperimposing of a relatively small count of frames may ensure that thetarget image includes a relatively low level of noise or no noise, andaccordingly, the clarity of the target image may be improved.

According to a further aspect of the present disclosure, the threadtuning may be used in the image processing program. For example, theinitial thread(s) may be determined according to the target threads inthe image processing program. In some embodiments, the system and methodmay obtain a predetermined number of initial threads associated with animage processing program, test a first processing time (e,g,, a totalprocessing time) for the initial threads under each of one or more(predetermined) distribution modes and/or in a parallel asynchronousprocessing mode, and determine a longest first processing timecorresponding to a target distribution mode of the one or moredistribution modes. The system and method may adjust, based on one ormore constraint rules, the first processing time associated with theinitial threads under the target distribution mode in the parallelasynchronous processing mode. A second processing time for each adjustedinitial thread may be determined in a single thread mode. A threadtuning threshold associated with each initial thread (or each adjustedinitial thread) may be identified based on the second processing time. Aplurality of target threads of the image processing program may beobtained. An adjusted image processing program may be obtained by tuningthe each target thread under the single thread mode based on acorresponding thread tuning threshold associated with a correspondinginitial thread (or a corresponding adjusted initial thread). The systemand method may avoid unnecessary repeated thread tuning operations, andimprove the processing efficiency of multi-thread tuning. Besides, thetarget image obtained based on the image processing program may includea relatively low level of noise or no noise, and accordingly, theclarity of the target image may be improved.

FIG. 1 is a schematic diagram illustrating an exemplary image processingsystem according to some embodiments of the present disclosure. Theimage processing system 100 may include a scanner 110, a network 120,one or more terminals 130, a processing device 140, and a storage device150. The components in the image processing system 100 may be connectedin one or more of various ways. Merely by way of example, the scanner110 may be connected to the processing device 140 through the network120. As another example, the scanner 110 may be connected to theprocessing device 140 directly as indicated by the bi-directional arrowin dotted lines linking the scanner 110 and the processing device 140.As still another example, the storage device 150 may be connected to theprocessing device 140 directly or through the network 120. As stillanother example, the terminal 130 may be connected to the processingdevice 140 directly (as indicated by the bi-directional arrow in dottedlines linking the terminal 130 and the processing device 140) or throughthe network 120.

The scanner 110 may generate or provide image(s) via scanning a subjector a part of the subject. In some embodiments, the scanner 110 may be amedical imaging device, for example, a positron emission tomography(PET) device, a single-photon emission computed tomography (SPECT)device, a computed tomography (CT) device, a magnetic resonance imaging(MRI) device, or the like, or any combination thereof. In someembodiments, the scanner 110 may include a single-modality scanner. Thesingle-modality scanner may include an MRI scanner, a CT scanner, a PETscanner, a cone beam CT (CBCT) imaging device, a single photon emissiontomography (SPET) imaging device, an X-ray (XR) imaging device, afull-field digital mammography (FFDM) imaging device, or a digitalbreast tomosynthesis (DBT) imaging device, or the like, or anycombination thereof. For example, the scanner 110 may be a C-arm X-raymachine. In some embodiments, the scanner 110 may include amulti-modality scanner. The multi-modality scanner may include apositron emission tomography-computed tomography (PET-CT) scanner, apositron emission tomography-magnetic resonance imaging (PET-MRI)scanner, a SPET-CT scanner, or the like, or any combination thereof. Themulti-modality scanner may perform multi-modality imagingsimultaneously. For example, the PET-CT scanner may generate structuralX-ray CT data and functional PET data simultaneously in a single scan.The PET-MRI scanner may generate MRI data and PET data simultaneously ina single scan.

In some embodiments, the subject may include a body, substance, or thelike, or any combination thereof. In some embodiments, the subject mayinclude a specific portion of a body, such as a head, a thorax, anabdomen, or the like, or any combination thereof. In some embodiments,the subject may include a specific organ, such as a breast, anesophagus, a trachea, a bronchus, a stomach, a gallbladder, a smallintestine, a colon, a bladder, a ureter, a uterus, a fallopian tube,etc. In some embodiments, the subject may include a physical model (alsoreferred to as a mockup). The physical model may include one or morematerials constructed as different shapes and/or dimensions. Differentparts of the physical model may be made of different materials.Different materials may have different X-ray attenuation coefficients,different tracer isotopes, and/or different hydrogen proton contents.Therefore, different parts of the physical model may be recognized bythe image processing system 100. In the present disclosure, “object” and“subject” are used interchangeably. In some embodiments, the scanner 110may include a scanning table. The subject may be placed on the scanningtable for imaging.

In some embodiments, the scanner 110 may transmit the image(s) via thenetwork 120 to the processing device 140, the storage device 150, and/orthe terminal(s) 130. For example, the image(s) may be sent to theprocessing device 140 for further processing or may be stored in thestorage device 150.

The network 120 may include any suitable network that can facilitate theexchange of information and/or data for the image processing system 100.In some embodiments, one or more components of the image processingsystem 100 (e.g., the scanner 110, the terminal 130, the processingdevice 140, the storage device 150) may communicate information and/ordata with one or more other components of the image processing system100 via the network 120. For example, the processing device 140 mayobtain one or more images from the scanner 110 via network 120. Asanother example, the processing device 140 may obtain one or more imagesfrom the storage device 150 via the network 120. As another example, theprocessing device 140 may obtain user instructions from the terminal 130via the network 120. The network 120 may be and/or include a publicnetwork (e.g., the Internet), a private network (e.g., a local areanetwork (LAN), a wide area network (WAN))), a wired network (e.g., anEthernet network), a wireless network (e.g., an 802.11 network, aViii-Fi network), a cellular network (e.g., a Long Term Evolution (LTE)network), a frame relay network, a virtual private network (“VPN”), asatellite network, a telephone network, routers, hubs, switches, servercomputers, and/or any combination thereof. Merely by way of example, thenetwork 120 may include a cable network, a wireline network, afiber-optic network, a telecommunications network, an intranet, awireless local area network (WLAN), a metropolitan area network (MAN), apublic telephone switched network (PSTN), a Bluetooth™ network, aZigBee™ network, a near field communication (NFC) network, or the Ike,or any combination thereof. In some embodiments, the network 120 mayinclude one or more network access points. For example, the network 120may include wired and/or wireless network access points such as basestations and/or internet exchange points through which one or morecomponents of the image processing system 100 may be connected to thenetwork 120 to exchange data and/or information.

The terminal(s) 130 may include a mobile device 131, a tablet computer132, a laptop computer 133, or the Ike, or any combination thereof. Insome embodiments, the mobile device 131 may include a smart home device,a wearable device, a smart mobile device, a virtual reality device, anaugmented reality device, or the like, or any combination thereof.Merely by way of example, the terminal 130 may include a mobile deviceas illustrated in FIG. 3. In some embodiments, the smart home device mayinclude a smart lighting device, a control device of an intelligentelectrical apparatus, a smart monitoring device, a smart television, asmart video camera, an interphone, or the like, or any combinationthereof. In some embodiments, the wearable device may include abracelet, footwear, eyeglasses, a helmet, a watch, clothing, a backpack,a smart accessory, or the like, or any combination thereof. In someembodiments, the mobile device may include a mobile phone, a personaldigital assistant (PDA), a gaming device, a navigation device, a pointof sale (POS) device, a laptop, a tablet computer, a desktop, or thelike, or any combination thereof. In some embodiments, the virtualreality device and/or the augmented reality device may include a virtualreality helmet, virtual reality glasses, a virtual reality patch, anaugmented reality helmet, augmented reality glasses, an augmentedreality patch, or the like, or any combination thereof. For example, thevirtual reality device and/or the augmented reality device may include aGoogle Glass™, an Oculus Rift™, a Hololens™, a Gear VR™, etc. In someembodiments, the terminal(s) 130 may be part of the processing device140.

The processing device 140 may process data and/or information obtainedfrom the scanner 110, the terminal 130, and/or the storage device 150.For example, the processing device 140 may obtain a predetermined numberof initial threads associated with an image processing program. Asanother example, the processing device 140 may test a first processingtime for the initial threads in a parallel asynchronous processing modeunder each of one or more distribution modes. As still another example,the processing device 140 may determine a longest first processing timecorresponding to a target distribution mode of the one or moredistribution modes. As still another example, the processing device 140may adjust the first processing time associated with the initial threadsunder the target distribution mode in the parallel asynchronousprocessing mode based on one or more constraint rules. As still anotherexample, the processing device 140 may determine a second processingtime for each adjusted initial thread in a single thread mode. As stillanother example, the processing device 140 may identify a thread tuningthreshold associated with each initial thread based on the secondprocessing time. As still another example, the processing device 140 mayobtain a plurality of target threads of the image processing program. Asstill another example, the processing device 140 may obtain an adjustedimage processing program by tuning each target thread under the singlethread mode based on a corresponding thread tuning threshold associatedwith a corresponding initial thread. More descriptions of the processingdevice 140 may be found elsewhere in the present disclosure (e.g., FIGS.7 and 14, and descriptions thereof).

In some embodiments, the processing device 140 may be a single server ora server group. The server group may be centralized or distributed. Insome embodiments, the processing device 140 may be local or remote. Forexample, the processing device 140 may access information and/or datastored in the scanner 110, the terminal 130, and/or the storage device150 via the network 120. As another example, the processing device 140may be directly connected to the scanner 110, the terminal 130 and/orthe storage device 150 to access stored information and/or data. In someembodiments, the processing device 140 may be implemented on a cloudplatform. Merely by way of example, the cloud platform may include aprivate cloud, a public cloud, a hybrid cloud, a community cloud, adistributed cloud, an inter-cloud, a multi-cloud, or the like, or anycombination thereof. In some embodiments, the processing device 140 maybe implemented by a computing device 200 having one or more componentsas illustrated in FIG. 2. In some embodiments, the processing device 140may include a central processing unit (CPU). The CPU may include asingle-core CPU, a Dual-core CPU, a Quad-core CPU, a Hex-core CPU, anActa-core CPU, or the like, or any combination thereof.

The storage device 150 may store data, instructions, and/or any otherinformation. In some embodiments, the storage device 150 may store dataobtained from the scanner 110, the terminal 130 and/or the processingdevice 140. For example, the storage device 150 may store one or moreimages obtained from the scanner 110. As another example, the storagedevice 150 may store a predetermined number of initial threadsassociated with image processing obtained by the processing device 140.As still another example, the storage device 150 may store one or morethread tuning thresholds (associated with one or more initial threads)identified by the processing device 140. In some embodiments, thestorage device 150 may store data and/or instructions that theprocessing device 140 may execute or use to perform exemplary methodsdescribed in the present disclosure. For example, the storage device 150may store instructions that the processing device 140 may execute or useto obtain one or more initial threads. As another example, the storagedevice 150 may store instructions that the processing device 140 mayexecute or use to test a first processing time for the initial threadsin a parallel asynchronous processing mode under each of one or moredistribution modes. As still another example, the storage device 150 maystore instructions that the processing device 140 may execute or use todetermine a longest first processing time corresponding to a targetdistribution mode of the one or more distribution modes. As stillanother example, the storage device 150 may store instructions that theprocessing device 140 may execute or use to determine a secondprocessing time for each adjusted initial thread in a single threadmode. As still another example, the storage device 150 may storeinstructions that the processing device 140 may execute or use toidentify a thread tuning threshold associated with each initial threadbased on the second processing time. As still another example, thestorage device 150 may store instructions that the processing device 140may execute or use to obtain an adjusted image processing program bytuning the each target thread under the single thread mode based on acorresponding thread tuning threshold associated with a correspondinginitial thread.

In some embodiments, the storage device 150 may include a mass storage,a removable storage, a volatile read-and-write memory, a read-onlymemory (ROM), or the like, or any combination thereof. Exemplary massstorage may include a magnetic disk, an optical disk, a solid-statedrive, etc, Exemplary removable storage may include a flash drive, afloppy disk, an optical disk, a memory card, a zip disk, a magnetictape, etc, Exemplary volatile read-and-write memory may include a randomaccess memory (RAM). Exemplary RAM may include a dynamic RAM (DRAM), adouble date rate synchronous dynamic RAM (DDR SDRAM), a static RAM(SRAM), a thyristor RAM (T-RAM), and a zero-capacitor RAM (Z-RAM), etc.Exemplary ROM may include a mask ROM (MROM), a programmable ROM (PROM),an erasable programmable ROM (EPROM), an electrically erasableprogrammable ROM (EEPROM), a compact disk ROM (CD-ROM), and a digitalversatile disk ROM, etc. In some embodiments, the storage device 150 maybe implemented on a cloud platform. Merely by way of example, the cloudplatform may include a private cloud, a public cloud, a hybrid cloud, acommunity cloud, a distributed cloud, an inter-cloud, a multi-cloud, orthe like, or any combination thereof.

In some embodiments, the storage device 150 may be connected to thenetwork 120 to communicate with one or more other components of theimage processing system 100 (e.g., the processing device 140, theterminal 130). One or more components of the image processing system 100may access the data or instructions stored in the storage device 150 viathe network 120. In some embodiments, the storage device 150 may bedirectly connected to or communicate with one or more other componentsof the image processing system 100 (e.g., the processing device 140, theterminal 130). In some embodiments, the storage device 150 may be partof the processing device 140.

FIG. 2 is a schematic diagram illustrating exemplary hardware and/orsoftware components of an exemplary computing device on which theprocessing device 140 may be implemented according to some embodimentsof the present disclosure. As illustrated in FIG. 2, the computingdevice 200 may include a processor 210, a storage 220, an input/output(I/O) 230, and a communication port 240.

The processor 210 may execute computer instructions (e.g., program code)and perform functions of the processing device 140 in accordance withtechniques described herein. The computer instructions may include, forexample, routines, programs, objects, components, data structures,procedures, modules, and functions, which perform particular functionsdescribed herein. For example, the processor 210 may process dataobtained from the scanner 110, the terminal 130, the storage device 150,and/or any other component of the image processing system 100. In someembodiments, the processor 210 may test a first processing time for theinitial threads in a parallel asynchronous processing mode under each ofone or more distribution modes. The initial threads may be obtained fromthe image processing system 100. In some embodiments, the processor 210may identify a thread tuning threshold associated with each initialthread. In some embodiments, the processor 210 may obtain an adjustedimage processing program by tuning the each target thread under thesingle thread mode based on a corresponding thread tuning thresholdassociated with a corresponding initial thread. In some embodiments, theprocessor 210 may include one or more hardware processors, such as amicrocontroller, a microprocessor, a reduced instruction set computer(RISC), an application specific integrated circuits (ASICs), anapplication-specific instruction-set processor (ASP), a centralprocessing unit (CPU), a graphics processing unit (GPU), a physicsprocessing unit (PPU), a microcontroller unit, a digital signalprocessor (DSP), a field programmable gate array (FPGA), an advancedRISC machine (ARM), a programmable logic device (PLD), any circuit orprocessor capable of executing one or more functions, or the like, orany combinations thereof.

Merely for illustration, only one processor is described in thecomputing device 200. However, it should be noted that the computingdevice 200 in the present disclosure may also include multipleprocessors, thus operations and/or method steps that are performed byone processor as described in the present disclosure may also be jointlyor separately performed by the multiple processors. For example, if inthe present disclosure the processor of the computing device 200executes both operations A and operation B, it should be understood thatoperation A and operation B may also be performed by two or moredifferent processors jointly or separately in the computing device 200(e.g., a first processor executes operation A and a second processorexecutes operation B, or the first and second processors jointly executeoperations A and B).

The storage 220 may store data/information obtained from the radiationdelivery device 110, the terminal 130, the storage device 150, and/orany other component of the image processing system 100. In someembodiments, the storage 220 may include a mass storage device, aremovable storage device, a volatile read-and-write memory, a read-onlymemory (ROM), or the like, or any combination thereof. For example, themass storage may include a magnetic disk, an optical disk, a solid-statedrive, etc. The removable storage may include a flash drive, a floppydisk, an optical disk, a memory card, a zip disk, a magnetic tape, etc.The volatile read-and-write memory may include a random access memory(RAM). The RAM may include a dynamic RAM (DRAM), a double date ratesynchronous dynamic RAM (DDR SDRAM), a static RAM (SRAM), a thyristorRAM (T-RAM), and a zero-capacitor RAM (Z-RAM), etc. The ROM may includea mask ROM (MROM), a programmable ROM (PROM), an erasable programmableROM (EPROM), an electrically erasable programmable ROM (EEPROM), acompact disk ROM (CD-ROM), and a digital versatile disk ROM, etc. Insome embodiments, the storage 220 may store one or more programs and/orinstructions to perform exemplary methods described in the presentdisclosure. For example, the storage 220 may store an image processingprogram for processing one or more images, and/or a thread tuningprogram for tuning one or more threads.

The I/O 230 may input and/or output signals, data, information, etc. Insome embodiments, the I/O 230 may enable user interaction with theprocessing device 140. In some embodiments, the I/O 230 may include aninput device and an output device. Examples of the input device mayinclude a keyboard, a mouse, a touch screen, a microphone, or the like,or a combination thereof. Examples of the output device may include adisplay device, a loudspeaker, a printer, a projector, or the like, or acombination thereof. Examples of the display device may include a liquidcrystal display (LCD), a light-emitting diode (LED)-based display, aflat panel display, a curved screen, a television device, a cathode raytube (CRT), a touch screen, or the like, or a combination thereof.

The communication port 240 may be connected to a network (e.g., thenetwork 120) to facilitate data communications. The communication port240 may establish connections between the processing device 140 and theradiation delivery device 110, the terminal 130, and/or the storagedevice 150. The connection may be a wired connection, a wirelessconnection, any other communication connection that can enable datatransmission and/or reception, and/or any combination of theseconnections. The wired connection may include, for example, anelectrical cable, an optical cable, a telephone wire, or the like, orany combination thereof. The wireless connection may include, forexample, a Bluetooth™ link, a Wi-Fi™ link, a WiMax™ link, a WLAN link, aZigBee link, a mobile network link (e.g., 3G, 4G, 5G, etc.), or thelike, or a combination thereof. In some embodiments, the communicationport 240 may be and/or include a standardized communication port, suchas RS232, RS485, etc. In some embodiments, the communication port 240may be a specially designed communication port. For example, thecommunication port 240 may be designed in accordance with the digitalimaging and communications in medicine (DICOM) protocol.

FIG. 3 is a schematic diagram illustrating exemplary hardware and/orsoftware components of an exemplary mobile device 300 on which theterminal 130 may be implemented according to some embodiments of thepresent disclosure. As illustrated in FIG. 3, the mobile device 300 mayinclude a communication platform 310, a display 320, a graphicsprocessing unit (GPU) 330, a central processing unit (CPU) 340, an I/O350, a memory 360, and a storage 390. In some embodiments, any othersuitable component, including but not limited to a system bus or acontroller (not shown), may also be included in the mobile device 300.In some embodiments, a mobile operating system 370 (e.g., iOS™,Android™, Windows Phoney™, etc.) and one or more applications 380 may beloaded into the memory 360 from the storage 390 in order to be executedby the CPU 340. The applications 380 may include a browser or any othersuitable mobile apps for receiving and rendering information relating toimage processing or other information from the processing device 140.User interactions with the information stream may be achieved via theI/O 350 and provided to the processing device 140 and/or othercomponents of the image processing system 100 via the network 120. Insome embodiments, a user may input parameters to the image processingsystem 100, via the mobile device 300.

In order to implement various modules, units and their functionsdescribed above, a computer hardware platform may be used as hardwareplatforms of one or more elements (e.g., the processing device 140and/or other components of the image processing system 100 described inFIG. 1). Since these hardware elements, operating systems and programlanguages are common; it may be assumed that persons skilled in the artmay be familiar with these techniques and they may be able to provideinformation needed in the imaging according to the techniques describedin the present disclosure. A computer with the user interface may beused as a personal computer (PC), or other types of workstations orterminal devices. After being properly programmed, a computer with theuser interface may be used as a server. It may be considered that thoseskilled in the art may also be familiar with such structures, programs,or general operations of this type of computing device.

FIG. 4 is a flowchart illustrating an exemplary process for threadtuning according to some embodiments of the present disclosure. In someembodiments, process 400 may be executed by the image processing system100. For example, process 400 may be implemented as a set ofinstructions (e.g., an application) stored in one or more storagedevices (e.g., the storage device 150, the storage 220, and/or thestorage 390) and invoked and/or executed by the processing device 140(implemented on, for example, the processor 210 of the computing device200, and the CPU 340 of the mobile device 300). The operations of theprocess 400 presented below are intended to be illustrative. In someembodiments, the process 400 may be accomplished with one or moreadditional operations not described, and/or without one or more of theoperations discussed. Additionally, the order in which the operations ofthe process 400 as illustrated in FIG. 4 and described below is notintended to be limiting.

In some embodiments, as shown in FIG. 4, an exemplary thread tuningprocess is provided. The process 400 may include one or more of thefollowing operations:

In 4101, a predetermined number of initial threads may be obtained. Insome embodiments, the processing device 140 (e.g., the obtaining module7406) may perform operation 4101. A thread may refer to a sequence ofprogrammed instructions that can be managed independently by a schedulerof an operating system installed on a processor. In some embodiments,the initial threads may be generated or programmed by a user (e.g., anengineer). In some embodiments, the initial threads may be obtained fromone or more storage devices (e.g., the storage device 150, the storage220, and/or the storage 390) and/or an external data source. In someembodiments, the predetermined number may be set by the user. In someembodiments, the predetermined number may be determined according to thenumber (or count) of the target threads in an application programillustrated in 4109.

In 4102, processing time(s) of the initial thread(s) may be tested underone or more (predetermined) distribution modes and/or in a parallelasynchronous processing mode.

In some embodiments, the processing device 140 (e.g., the testing module7402) may perform operation 4102.

The predetermined number (or count) of the initial threads may refer tothe number (or count) of the cores in the central processing unit (CPU)(of a computing device (e,g,, the processing device 140)) and/or thenumber (or count) of the threads in the CPU. In some embodiments, thenumber of CPU cores corresponding to the number of threads CPUs may betwo cores with four threads, four cores with four threads, and/or fourcores with eight threads. If the number of threads is equal to thenumber of CPU cores, each thread may occupy one core for computationalprocessing. However, if the number of threads exceeds the number of CPUcores, the threads may preempt the CPU resources, resulting in longerprocessing time for the threads. Therefore, it is desirable to performthread tuning. In some embodiments, if the number of threads exceeds thenumber of cores, thread tuning may be performed according to process400.

In some embodiments, a thread may also be referred to as a lightweightprocess (LWP). A thread may be the smallest unit of a program executionflow. In some embodiments, a standard thread may include a thread ID, acurrent instruction pointer, a register set, a stack, or the like. Insome embodiments, a thread may be an entity in a process, and may be abasic unit that is independently scheduled and/or dispatched by thecomputing device. In some embodiments, the thread may be scheduled,according to one or more strategies, to the CPU to be executed.

Specifically, in some embodiments, the load performance of a thread maybe measured by the processing time of the thread. If the processing timeis relatively long, the load performance of the thread may be relativelylow. If the processing time is relatively short, the load performancemay be relatively high. The processing time(s) of the predeterminednumber of initial threads may be tested under one or more predetermineddistribution modes, and/or in a parallel asynchronous processing mode.In some embodiments, the processing time may refer to a total processingtime for all the initial threads to be processed. If the processing timeis relatively long, the load performance of the threads under thedistribution mode may be relatively low. The predetermined distributionmodes may include various distribution modes, including, for example, afirst distribution mode based on an even allocation of the totalprocessing time (among the initial threads) (also referred to as an evendistribution mode), a second distribution mode based on an allocationfrom small to large of the total processing time (among the initialthreads), a third distribution mode based on an allocation from large tosmall of the total processing time (among the initial threads), or thelike, or a combination thereof. In some embodiments, the processing timeof the predetermined number of threads in the parallel asynchronousprocessing mode and under different distribution modes may be testedseparately.

Merely by way of example, in image processing, the parallel asynchronousprocessing mode may refer that thread(s) process image(s) at a certainframe frequency, and the thread(s) can process a next image withoutwaiting for the processing of an entire current image to be finished.That is, multiple threads may process multiple images at the same time.Moreover, because the threads compete for CPU resources in the parallelasynchronous processing mode, the processing time may be excessivelyconsumed because of competition, thereby increasing the total processingtime (of the thread(s)) in the parallel asynchronous processing mode.That is, even if the processing time is preliminarily allocated to thethreads, the actual processing time may be much longer than theprocessing time allocated to the threads. For example, if thedistribution mode is the even distribution mode in which the totalprocessing time is evenly allocated to two cores with four threads, twothreads compete for one core, and the processing time allocated to thetwo threads that compete for one core is, on average, 45 ms, then anactual processing time of the threads may be about 145 ms as a result ofcompetition.

In 4104, the processing time(s) associated with the initial thread(s)may be adjusted, under a target distribution mode, and/or according toone or more constraint rules.

In some embodiments, the processing device 140 (e.g., the adjustmentmodule 7404) may perform operation 4104. In some embodiments, a longestprocessing time (e.g., a longest total processing time of thepredetermined number of initial threads) corresponding to a targetdistribution mode of the one or more distribution modes may bedetermined.

Specifically, in some embodiments, the target distribution mode mayrefer to a distribution mode that has a longest processing time, i.e., adistribution mode that has the lowest load performance. In someembodiments, in the process of program running, if the distribution modewith the lowest load performance meets the requirements of the system(e.g., the image processing system 100), then other distribution modesmay naturally meet the requirements of the system. Therefore, thedistribution mode with the longest processing time may be selected. Insome embodiments, under the distribution mode with the longestprocessing time, the processing time of the predetermined number ofinitial threads may be adjusted according to one or more constraintrules. Exemplary constraint rule (s) may include a first constraintassociated with the processing time of a thread (e.g., each thread) ofthe predetermined number of initial threads, and/or a second constraintassociated with the total processing time of the predetermined number ofinitial threads in the parallel asynchronous processing mode.

In some embodiments, each thread may need to satisfy a first constraint.In some embodiments, the first constraints for different threads may bethe same or different. For example, if the predetermined number of thethreads is 3, then a first thread may have a corresponding firstconstraint (e.g., 20 ms), a second thread may have a correspondingsecond constraint (e.g., 30 ms), and a third thread may have acorresponding first constraint (e,g,, 40 ms). In some embodiments, thefirst constraint associated with the processing time of each initialthread may also be referred to as a processing time constraint. In someembodiments, the second constraint associated with the total processingtime of the predetermined number of initial threads may also be referredto as a total processing time constraint. In some embodiments, theconstraint rule(s) may be used to limit the processing time(s) of thethread(s), so that the thread(s) may satisfy application requirementsafter adjustment. In some embodiments, the constraint rule(s) may bedetermined by the image processing system 100, or may be preset by auser or operator via the terminal(s) 130. In some embodiments, theconstraint rule(s) may be determined according to one or more externalconditions (e.g., the count of CPU cores, CPU performance, internalmemory size, or the like) and/or one or more application requirements.In some embodiments, the constraint rule(s) may be predetermined andstored in the storage device 150. In some embodiments, other exemplaryconstraint rule(s) may include a constraint associated with an internalmemory, a CPU consumption, or the like, or a combination thereof.

In 4106, the predetermined number of initial thread(s) that satisfy theconstraint rule(s) after adjustment may be obtained as adjusted initialthread(s).

In some embodiments, the processing device 140 (e.g., the obtainingmodule 7406) may perform operation 4106.

Specifically, in some embodiments, the processing time of thepredetermined number of initial threads may be adjusted to satisfy theprocessing time constraint associated with each thread, and the totalprocessing time constraint associated with the predetermined number ofthreads. In some embodiments, after adjustment, the threads that satisfythe constraint rule(s) may be obtained as adjusted initial threads.

In some embodiments, the adjustment of the initial thread(s) may includemodifying the programmed instructions of the initial thread(s),adjusting the size(s) of matrix(es) involved in matrix computation ofthe initial thread(s), adjusting a computational manner used in theinitial thread(s), or the like, or a combination thereof. For example,if the size of an initial matrix involved in matrix computation of aninitial thread is M×N (M and N may be positive integers), and theprocessing time of the initial thread is larger than the processing timeconstraint, then the size of the initial matrix may be adjusted to P×Q(P and Q may be positive integers, P may be smaller than M, and/or Q maybe smaller than N) to ensure that the processing time of the initialthread is smaller than or equal to the processing time constraint. Asanother example, the computational manner of the initial thread(s) maybe adjusted by simplifying a computational process, optimizing one ormore computational operations, altering one or more computationalalgorithms, or the like.

In 4108, a processing time of each adjusted initial thread may bedetermined in a single thread mode, and/or a thread tuning thresholdassociated with each initial thread (or each adjusted initial thread)may be identified based on the processing time.

In some embodiments, the processing device 140 (e.g., the determinationmodule 7408) may perform operation 4108.

Specifically, in some embodiments, in system operation, threads may berun in the parallel asynchronous processing mode. However, thread tuningmay be generally performed in a synchronous processing mode according toone or more thread tuning thresholds and/or one or more tuningalgorithms. The synchronous processing mode may refer to a mode in whicha single thread occupies all the cores during processing. Thesynchronous processing mode may also be referred to as a single threadmode. Therefore, in order to meet the actual tuning requirements (e.g.,the constraint rule(s)), each thread in the adjusted initial thread mayneed to be processed in the single thread mode and the processing timemay be obtained. For example, in image processing, the single threadmode may refer to a mode in which a plurality of threads successivelyprocess images, and a single thread may occupy all the cores at one timefor image processing. In the single thread mode, before processing thenext image, it may need to wait for the processing of the current imageto be finished. The parallel asynchronous processing mode may bedifferent from the synchronous processing mode (or the single threadmode).

In the synchronous processing mode, a thread may occupy all the cores,and thus, all the CPU resources may be used to process the same image atthe same time. Therefore, there may be no competition for CPU resourcesbetween the threads. If there is a CPU competition, relatively longprocessing time may be consumed due to the competition of CPU resources.The processing time in the case of no CPU resources competition may bethe actual processing time of the thread(s). Therefore, the processingtime of each adjusted initial thread in the single thread mode may beobtained. And the thread tuning threshold(s) may be determined accordingto the processing time(s).

In some embodiments, the processing time of an adjusted initial threadin the single thread mode may be directly designated as a thread tuningthreshold. In some embodiments, the processing time of an adjustedinitial thread in the single thread mode multiplied by a coefficient(e.g., 0.1, 0.2, 0.3, 0.4, 0,5, 0.6, 0.7, 0.8, 0.9, etc.) may bedesignated as a thread tuning threshold. In some embodiments, eachthread may have a corresponding thread tuning threshold. For example, ifthe predetermined number of the threads is 3, then a first thread mayhave a corresponding first thread tuning threshold (e.g., 20 ms), asecond thread may have a corresponding second thread tuning threshold(e,g., 30 ms), and a third thread may have a corresponding third threadtuning threshold (e.g., 40 ms). In some embodiments, the thread tuningthresholds corresponding to different threads may be the same ordifferent.

In 4109, an application program may be obtained. In sortie embodiments,the processing device 140 (e.g., the obtaining module 7406) may performoperation 4109. In some embodiments, the application program may relateto image processing. In some embodiments, the application program mayinclude one or more target threads. In some embodiments, the number (orcount) of the target threads may be the same as the predeterminednumber. In some embodiments, each target thread may correspond to aninitial thread (or adjusted initial thread). In some embodiments, thecomputation amount, the computational manner, the computationalgorithm(s), and/or the processing algorithm(s), or the like, of (orused in) each target thread may be similar to that of (or used in) thecorresponding initial thread (or adjusted initial thread). In someembodiments, operation 4109 may be performed before operation 4101, andthe predetermined number may be determined according to the count of thetarget threads. For example, the count of the target threads obtained in4109 may be designated as the predetermined number, and thepredetermined number of initial threads may be obtained.

In 4110, the target thread(s) may be tuned according to the threadtuning threshold(s).

In some embodiments, the processing device 140 (e.g., the tuning module7410) may perform operation 4110. As used herein, thread tuning mayrefer to modifying the target thread(s) so that the target thread(s)satisfy the constraint rules as illustrated above. In some embodiments,thread tuning may include adjusting one or more programmed instructions(or program codes) of the target thread(s), adding one or more newthreads to share a working burden of the target thread(s), adjusting thedistribution of internal memory, or the like, or a combination thereof.In some embodiments, the adjustment of the programmed instructions (orprogram codes) of the target thread(s) may include modifying theprogrammed instructions of the initial thread(s), adjusting the size(s)of matrix(es) involved in matrix computation of the initial thread(s),adjusting a computational manner used in the initial thread(s), or thelike, or a combination thereof. In some embodiments, the targetthread(s) may be tuned (or adjusted) while keeping the count of theadjusted target thread(s) equal to the predetermined number. In someembodiments, thread tuning may be performed according to one or morethread tuning algorithms. Exemplary thread tuning algorithms may includea tasks optimization algorithm based on energy-effectiveness model(TO-EEM), an ant colony optimization algorithm for thread scheduling(ACOTS), or the like. More descriptions of thread tuning may be foundelsewhere in the present disclosure (e.g., FIG. 6, and the descriptionsthereof).

Specifically, a thread tuning threshold may be the processing time of athread in the single thread mode. For each single thread involved in amulti-threaded application program, if the processing time of the threadis longer than the thread tuning threshold (corresponding to thethread), the thread may need to be tuned until the thread tuningthreshold is met (i.e., the processing time is less than or equal to thethread tuning threshold in the single thread mode). The thread(s) thatsatisfy the thread tuning threshold(s) may be actually used in theapplication program.

It may be understood that in some embodiments, the number of threads maybe constant in operations 4102 through 4110. For example, if the testedpredetermined number of threads include two specific threads, the threadtuning threshold(s) may be used for a situation with two specificthreads. If three specific threads are tested, the thread tuningthreshold(s) may be used for a situation with three specific threads.

It should be noted that in some embodiments, if one or more new threadsare added in thread tuning in 4110, then the predetermined number of theinitial threads may be increased accordingly, and one or more ofoperations 4102 through 4110 may need to be performed again. Forexample, if the initial threads include four threads, and the initialthreads do not satisfy one or more of the constraint rules afteradjustment, then a new thread may be added, and five initial threads maybe obtained. In 4102, the (total) processing time of the five threadsmay be tested under one or more distribution modes in the parallelasynchronous processing mode. In 4104, the processing times associatedwith the five threads may be adjusted under the target distribution mode(with a longest total processing time of the five threads) according tothe constraint rules. In 4106, the five threads that satisfy theconstraint rules after adjustment may be obtained as five adjustedinitial threads. In 4108, the processing time of each of the fiveadjusted initial threads may be determined in a single thread mode,and/or a thread tuning threshold associated with each initial thread (oreach adjusted initial thread) may be identified based on the processingtime. In 4109, the application program including five target threads maybe obtained. In 4110, the five target threads may be tuned according tothe five thread tuning thresholds, respectively. In some embodiments, tofacilitate the thread tuning operation, various predetermined numbers ofthreads may be tested. For example, the predetermined numbers mayinclude all integers from 2 to 8. That is, seven predetermined numbersof initial threads (or seven set of initial threads) may be obtainedand/or tested, in which the first set of initial threads may include twoinitial threads, the second set of initial threads may include threeinitial threads, the seventh set of initial threads may include eightinitial threads. In 4102, the processing time of the seven set ofinitial threads may be tested under one or more distribution modes inthe parallel asynchronous processing time, respectively. In 4104, theprocessing time associated with the seven sets of initial threads may beadjusted under the target distribution mode according to the constraintrules, respectively. In 4106, the seven sets of initial threads thatsatisfy the constraint rules after adjustment may be obtained as sevensets of adjusted initial threads, respectively. In 4108, the processingtime of each adjusted initial thread of each set of adjusted initialthread may be determined in a single thread mode, and/or a thread tuningthreshold associated with each initial thread (or each adjusted initialthread) may be identified based on the processing time, respectively.Therefore, seven sets of thread tuning thresholds may be obtained. If anapplication program including four target threads is obtained in 4109,and in the thread tuning in 4110, no new thread is added, then in 4110,the four target threads may be tuned according to a corresponding set ofthread tuning thresholds that include four thread tuning thresholds. Ifan application program including four target threads is obtained in4109, and in the thread tuning in 4110, a new thread is added, then in4110, five target threads may be tuned according to a corresponding setof thread tuning thresholds that include five thread tuning thresholds.

According to the process for thread tuning described above, the threadtuning threshold may be determined according to the processing time ofeach adjusted initial thread in the single thread mode, and theprocessing time may be adjusted under the distribution mode with thelowest load performance, and based on constraint rule(s).

The performances of the distribution modes and the situation that aplurality of threads may compete for the CPU cores may be considered.Therefore, the thread tuning threshold(s) may represent the mostappropriate processing time of the thread(s), and can serve asperformance parameter(s) for thread tuning. In the subsequent design ofmulti-threaded application(s), for example, an application includingthree threads (such as threads A, B, C), according to the operations4102 through 4110, the thread tuning thresholds may be used,respectively, as the tuning criterion of the three threads (A, B, C). Ifthe processing time of a thread is larger than the thread tuningthreshold determined in 4108, the thread may need to be tuned to meetthe thread tuning threshold, and then the tuned thread can be added tothe designed application. The processing time of a thread can bedirectly compared with corresponding thread tuning threshold, and thus,unnecessary repeated tuning can be eliminated, and accordingly, theprocessing efficiency of multi-thread tuning can be improved.

It should be noted that the above description of process 400 is merelyprovided for the purposes of illustration, and not intended to limit thescope of the present disclosure. For persons having ordinary skills inthe art, multiple variations and modifications may be made under theteachings of the present disclosure. However, those variations andmodifications do not depart from the scope of the present disclosure.For example, operation 4109 may be performed before 4101. As anotherexample, operations 4101 and 4109 may be integrated into a singleoperation. As a further example, operations 4101 and/or 4109 may beomitted,

FIG. 5 is a flowchart illustrating an exemplary process for adjustingthe processing time(s) of the initial thread(s) according to someembodiments of the present disclosure. In some embodiments, at leastpart of process 500 may be performed by the processing device 140(implemented in, for example, the computing device 200 shown in FIG. 2).For example, the process 500 may be stored in a storage device (e.g.,the storage device 150, the storage 220, the storage 390) in the form ofinstructions (e.g., an application), and invoked and/or executed by theprocessing device 140 (e.g., the processor 210 illustrated in FIG. 2,the CPU 340 illustrated in FIG. 3, or one or more modules in theprocessing device 140 a illustrated in FIG. 7). The operations of theillustrated process presented below are intended to be illustrative. Insome embodiments, the process 500 may be accomplished with one or moreadditional operations not described, and/or without one or more of theoperations discussed. Additionally, the order in which the operations ofthe process 500 as illustrated in FIG. 5 and described below is notintended to be limiting. In some embodiments, operation 4104 illustratedin FIG. 4 may be performed according to the process 500.

In some embodiments, as shown in FIG. 5, an exemplary adjustment processof the processing time(s) associated with the initial thread(s) underthe target distribution mode and according to the constraint rules isprovided. The process 500 may include one or more of the followingoperations:

In 5202, one or more constraint rules may be obtained.

In some embodiments, the processing device 140 (e.g., the adjustmentmodule 7404) may perform operation 5202. In some embodiments, in 5202, aprocessing time constraint for each initial thread and/or a totalprocessing time constraint for the predetermined number of initialthreads may be obtained. In some embodiments, the processing timeconstraint for each initial thread may be associated with a first upperlimit value. In some embodiments, the total processing time constraintfor the predetermined number of initial threads may be associated with asecond upper limit value.

In some embodiments, exemplary constraint rule(s) may include a firstconstraint associated with the processing time of a thread (e.g., eachthread) of the predetermined number of initial threads, and/or a secondconstraint associated with the total processing time of thepredetermined number of initial threads in the parallel asynchronousprocessing mode.

Specifically, in some embodiments, obtaining the constraint rule(s) mayinclude obtaining the processing time of a thread (e.g., each thread) ofthe predetermined number of initial threads, and/or the total processingtime of the predetermined number of initial threads in the parallelasynchronous processing mode. That is, a first upper limit value of theprocessing time of a thread (e.g., each thread) of the predeterminednumber of initial threads and/or a second upper limit value of the totalprocessing time of the predetermined number of initial threads may beobtained. In some embodiments, the constraint rule(s) may be setaccording to one or more application requirements,

In 5204, the processing time of a thread (e.g., each thread) of thepredetermined number of initial threads may be adjusted, under thetarget distribution mode, according to the first constraint (rule) untilthe total processing time of the predetermined number of initial threadssatisfies the second constraint (rule).

In some embodiments, the processing device 140 (e.g., the adjustmentmodule 7404) may perform operation 5204. In some embodiments, theprocessing time(s) of the initial thread(s) may be adjusted according tothe first constraint and/or the second constraint.

In some embodiments, according to the first constraint associated withthe processing time of a thread (e.g., each thread) of the predeterminednumber of initial threads, the processing time of a thread (e.g., eachthread) of the predetermined number of initial threads may need to beless than or equal to a threshold. According to the second constraintassociated with the total processing time of the predetermined number ofinitial threads, the total processing time of the predetermined numberof initial threads may need to be less than or equal to anotherthreshold.

Specifically, in some embodiments, under the target distribution mode,the processing time of a thread (e.g., each thread) of the predeterminednumber of initial threads may be adjusted according to a first upperlimit value of the processing time of the thread, and accordingly, theprocessing time of the thread may not exceed the first upper limit valueof the processing time of the thread. After the predetermined number ofinitial threads are adjusted, the total processing time of thepredetermined number of initial threads may be tested, under the targetdistribution mode, in the parallel asynchronous processing mode. Thetotal processing time may be associated with the predetermined number ofinitial threads. If the total processing time satisfies the secondconstraint, i.e., the total processing time associated with thepredetermined number of initial threads is less than or equal to thesecond upper limit value of the total processing time, then thepredetermined number of threads that have been adjusted and satisfy theconstraint rule(s) may be obtained as the adjusted initial threads.

For example, in some embodiments, if there are two initial threads, thefirst upper limit value of the processing time associated with eachinitial thread is 50 ms, and the second upper limit value of the totalprocessing time associated with the predetermined number of initialthreads is 150 ms under the even distribution mode. The example ismerely provided for the purposes of illustration, and not intended tolimit the scope of the present disclosure. Because the processing timeconstraint associated with each thread is 50 ms, first, the processingtime of the two initial threads may be adjusted to the first upper limitvalue of 50 ms according to the first constraint. That is, theprocessing time of 50 ms may be allocated to each of the two initialthreads. The two threads may be executed in the parallel asynchronousmode to obtain the total processing time. If the total processing timeis less than or equal to 150 ms, the two threads each of which having aprocessing time that is adjusted to 50 ms may be obtained the adjustedinitial threads that satisfy the constraint rule(s). If the totalprocessing time is larger than 150 ms, the total processing time may notmeet the second upper limit value of 150 ms according to the totalprocessing time constraint associated with the predetermined number ofinitial threads. Therefore, the processing times associated with the twothreads may need to be further adjusted. Because the total processingtime is larger than the second upper limit value of 150 ms of the totalprocessing time constraint associated with the predetermined number ofinitial threads, the processing time allocated to the two threads may beadjusted downward to, for example, 45 ms. It may be further determinedwhether the total processing time associated with the predeterminednumber of threads meets the second upper limit value of 150 ms in theparallel asynchronous mode after the processing time of each thread isadjusted to 45 ms. If the total processing time meets the second upperlimit value, the processing time adjustment may be completed. If thetotal processing time does not meet the second upper limit value, theprocessing time adjustment may be performed again until the totalprocessing time meets the second upper limit value.

In some embodiments, if the total processing time is less than 150 msafter the processing time associated with the two threads is adjusted to45 ms, the processing time associated with the two threads may befurther adjusted upward from 45 ms. It may be determined whether thetotal processing time meets the second upper limit value of 150 ms ifthe processing time associated with the two threads is larger than 45ms. That is, the processing time(s) of the thread(s) may be adjusted, sothat the processing time of each thread is close to the first upperlimit value of the processing time associated with the thread, and thetotal processing time is close to the second upper limit value of thetotal processing time associated with the two threads as much aspossible. The upper limit value (e.g., the first upper limit value,and/or the second upper limit value) may be predetermined according toactual application requirements. In some embodiments, the maximumprocessing load of the thread(s) may be considered, The predeterminedfirst and second upper limit values (e.g., 50 ms and 150 ms,respectively) may indicate the processing time of the maximum processingload that the CPU can load. Therefore, if the processing timesassociated with the predetermined number of threads are adjusted closeto the predetermined first and second upper limit values as much aspossible, the maximum processing load of the CPU may be ensured as muchas possible, and accordingly, the maximum processing load of the CPU maybe prevented from being reduced in subsequent tuning operations.

FIG. 6 is a flowchart illustrating an exemplary process for threadtuning according to some embodiments of the present disclosure. In someembodiments, at least part of process 600 may be performed by theprocessing device 140 (implemented in, for example, the computing device200 shown in FIG. 2). For example, the process 500 may be stored in astorage device (e.g., the storage device 150, the storage 220, thestorage 390) in the form of instructions (e.g., an application), andinvoked and/or executed by the processing device 140 (e.g., theprocessor 210 illustrated in FIG. 2, the CPU 340 illustrated in FIG. 3,or one or more modules in the processing device 140 a illustrated inFIG. 7). The operations of the illustrated process presented below areintended to be illustrative. In some embodiments, the process 600 may beaccomplished with one or more additional operations not described,and/or without one or more of the operations discussed. Additionally,the order in which the operations of the process 600 as illustrated inFIG. 6 and described below is not intended to be limiting. In someembodiments, operation 4110 illustrated in FIG. 4 may be performedaccording to the process 600.

In some embodiments, as shown in FIG. 6, an exemplary thread tuningprocess based on one or more thread tuning thresholds is provided. Theprocess 600 may include one or more of the following operations:

In 6302, it may be determined whether the processing time associatedwith a target thread (e.g., each target thread) is less than or equal toa corresponding thread tuning threshold.

In some embodiments, the processing device 140 (e.g., the tuning module7410) may perform operation 6302. In some embodiments, as illustratedabove, each target thread may correspond to an initial thread (or anadjusted initial thread), and each initial thread (or adjusted initialthread) may correspond to a thread tuning threshold.

Therefore, each target thread may correspond to a thread tuningthreshold, i.e., each target thread may have a corresponding threadtuning threshold. The thread tuning thresholds for different targetthreads may be the same or different.

Specifically, in some embodiments, a thread tuning threshold may referto the processing time constraint associated with a thread (e.g., eachthread) in the single thread mode. In a multi-threaded application, ifthe processing time(s) associated with the thread(s) of themulti-threaded application are larger than the corresponding threadtuning threshold(s), the thread(s) may need to be tuned, Therefore, itmay be determined whether the processing time associated with a targetthread (e.g., each target thread) is less than or equal to thecorresponding thread tuning threshold.

In 6304, if not (i.e., the processing time of the target thread islarger than the corresponding thread tuning threshold), the processingtime of the target thread may be adjusted according to the thread tuningthreshold, until the processing time is less than or equal to the threadtuning threshold.

In some embodiments, the processing device 140 (e.g., the tuning module7410) may perform operation 6304. More descriptions of the thread tuningoperation may be found elsewhere in the present disclosure (e.g., FIG. 4and descriptions thereof).

Specifically, in some embodiments, if it is determined that theprocessing time of the target thread is larger than the thread tuningthreshold, the processing time associated with the target thread may beadjusted until the thread tuning threshold is met. That is, the targetthread can be actually used in the application only when the processingtime of the target thread is less than or equal to the thread tuningthreshold.

It should be noted that the above description of process 600 is merelyprovided for the purposes of illustration, and not intended to limit thescope of the present disclosure. For persons having ordinary skills inthe art, multiple variations and modifications may be made under theteachings of the present disclosure. However, those variations andmodifications do not depart from the scope of the present disclosure.Although the thread tuning operation for only one target thread isillustrated in FIG. 6, any other target thread of a multi-threadedapplication can be tuned similarly as illustrated in FIG. 6.

In some embodiments, the one or more distribution modes described in thepresent disclosure may include, but not limited to, the following threetypes: a first distribution mode based on an even allocation of thetotal processing time (among the threads), a second distribution modebased on an allocation from small to large of the total processing time(among the threads), a third distribution mode based on an allocationfrom large to small of the total processing time (among the threads).For any distribution mode, in the thread tuning of threads of amulti-threaded application, the time allocation for each thread may beconsidered in the single thread mode. Therefore, the total timeallocation for the predetermined number of threads may be the same asthe total processing time of the predetermined number of threads. Beforetesting of the processing time(s), the processing time may be allocatedto each thread according to one or more distribution modes. The testingof the processing time(s) may be performed in a multi-thread parallelasynchronous processing mode. The processing time(s) associated with thethread(s) in the multi-thread parallel asynchronous processing mode maybe different from the processing time(s) in the single thread mode.Therefore, it may be desirable to determine the processing time of eachthread in one or mode distribution modes, separately.

For example, if the total processing time is 100 ms for four threads(e.g., thread 1, thread 2, thread 3, thread 4) that are processedindividually, in the first distribution mode, the processing timeallocated to each thread may be 25 ms. In the second distribution mode,the total processing time may be allocated from small to large among thefour threads. For example, thread 1 may be allocated with 10 ms of thetotal processing time, thread 2 may be allocated with 20 ms of theprocessing time, thread 3 may be allocated with 30 ms of the processingtime, and thread 4 may be allocated with 40 ms of the processing time.In the third distribution mode, the processing time may be allocatedfrom large to small among the four threads. For example, thread 1 may beallocated with 40 ms of the processing time, thread 2 may be allocatedwith 30 ms of the processing time, thread 3 may be allocated with 20 msof the processing time, and thread 4 may be allocated with 10 ms of theprocessing time.

According to the one or more distribution modes, the processing time(s)of the thread(s) may be tested in the one or more distribution modes,and the load performance of the thread(s) may be determined according tothe processing time(s) of the thread(s) in the one or more distributionmodes. The thread(s) under the target distribution mode corresponding tothe longest processing time may have the lowest load performance. Duringthe execution of an application program, the processing time(s) of thethread(s) may fluctuate. If the distribution mode associated with thelowest load performance can meet the requirements of the system (e.g.,the image processing system 100), other distribution modes may also meetthe requirements of the system. Therefore, by testing the loadperformance under one or more distribution modes, the distribution modeassociated with the lowest load performance may be selected and thethread tuning threshold(s) may be determined under the targetdistribution mode associated with the lowest load performance, therebyensuring that the thread tuning threshold(s) can be applied to any oneof the distribution modes in actual operation.

In some embodiments, in order to test the load performance of a thread(e.g., each thread) under the one or more distribution modes, at leasttwo of the three distribution modes (e.g., the first distribution mode,the second distribution mode, the third distribution mode) may beselected.

According to the process(es) as illustrated above, because the threadtuning threshold(s) are determined according to the processing time(s)associated with the adjusted thread(s) in the single thread mode, andthe processing time(s) are determined based on the target distributionmode (corresponding to the longest processing time) and the constraintrule(s), the performance of the distribution modes and the situationthat a plurality of threads compete for the core(s) (of the CPU) can beconsidered in the thread tuning operation. Therefore, the thread tuningthreshold(s) may represent the most appropriate processing time(s) ofthe thread(s), and may serve as a performance parameter for threadtuning. In the subsequent design of multi-threaded applications, thethread tuning threshold(s) may be used as the tuning criteria. If theprocessing time associated with a thread is larger than a correspondingthread tuning threshold, the thread may need to be tuned to meet thethread tuning threshold, and may be added to the designed applicationwhen the thread tuning threshold is met. By directly comparing with thethread tuning threshold, unnecessary repeated thread tuning operationmay be avoided, and the processing efficiency of multi-thread tuning maybe improved.

It may be understood that although the various operations in theflowcharts of FIGS. 4-6 are displayed successfully as indicated by thearrows, these operations are not necessarily performed in the orderindicated by the arrows. Except as explicitly stated herein, there is nostrict ordering of the execution of these operations, and theseoperations can be performed in other orders. Moreover, at least aportion of the operations in FIGS. 4-6 may include a plurality ofsub-operations or a plurality of stages. These sub-operations or stagesare not necessarily performed at the same time, but may be executed atdifferent times. The execution order of these sub-operations or stagesis also not necessarily successful, but may be performed alternately oralternately with other operations or at least a portion ofsub-operations or stages of other operations.

FIG. 7 is a block diagram illustrating an exemplary processing deviceaccording to some embodiments of the present disclosure. In someembodiments, the processing device 140 a may be a thread tuning device.

hi some embodiments, as shown in FIG. 7. a thread tuning device isprovided. The thread tuning device may include a testing module 7402, anadjustment module 7404, an obtaining module 7406, a determination module7408, and a tuning module 7410.

The testing module 7402 may be configured to test processing time(s)associated with the initial thread(s) under one or more predetermineddistribution modes in the parallel asynchronous processing mode.

The adjustment module 7404 may be configured to adjust the processingtime(s) associated with the initial thread(s) under a targetdistribution mode, and/or according to one or more constraint rules.

In some embodiments, the adjustment module 7404 may obtain one or moreconstraint rules. In some embodiments, the adjustment module 7404 mayadjust the processing time of a thread (e.g., each thread) of thepredetermined number of initial threads, under the target distributionmode, according to the first constraint (rule) until the totalprocessing time of the predetermined number of initial threads satisfiesthe second constraint (rule).

The obtaining module 7406 may be configured to obtain the predeterminednumber of initial thread(s) that satisfy the constraint rule(s) afteradjustment as adjusted initial thread(s).

In some embodiments, the obtaining module 7406 may obtain thepredetermined number of initial threads. In some embodiments, theobtaining module 7406 may obtain an application program.

The determination module 7408 may be configured to determine aprocessing time associated with each adjusted initial thread under asingle thread mode, and/or identify a thread tuning threshold associatedwith each initial thread (or each adjusted initial thread) according tothe processing time.

The tuning module 7410 may be configured to tune the target thread(s)according to the thread tuning threshold(s).

In some embodiments, the testing module 7402 may include a ruleobtaining sub-module and/or a processing time adjustment sub-module. Therule obtaining sub-module may be configured to obtain a first constraintassociated with the processing time of a thread (e.g., each thread) ofthe predetermined number of initial threads, and/or a second constraintassociated with the total processing time of the predetermined number ofinitial threads in the parallel asynchronous processing mode. Theprocessing time adjustment sub-module may be configured to adjust theprocessing time of a thread (e.g., each thread) of the predeterminednumber of initial threads according to the first constraint until thetotal processing time of the predetermined number of initial threadssatisfies the second constraint.

In some embodiments, the tuning module 7410 may be further configured todetermine whether the processing time associated with a target thread(e.g., each target thread) is less than or equal to a correspondingthread tuning threshold. If not, the tuning module 7410 may adjust theprocessing time of the target thread according to thread tuningthreshold until the processing time is less than or equal to the threadtuning threshold.

According to the process(es) and the device(s) as illustrated above,because the thread tuning threshold(s) are determined according to theprocessing time(s) associated with the adjusted thread(s) in the singlethread mode, and the processing time(s) are determined based on thetarget distribution mode (corresponding to the longest processing time)and the constraint rule(s), the performance of the distribution modesand the situation that a plurality of threads compete for the core(s)(of the CPU) can be considered in the thread tuning operation.Therefore, the thread tuning threshold(s) may represent the mostappropriate processing time(s) of the thread(s), and may serve as aperformance parameter for thread tuning. In the subsequent design ofmulti-threaded applications, the thread tuning threshold(s) may be usedas the tuning criteria. If the processing time associated with a threadis larger than a corresponding thread tuning threshold, the thread mayneed to be tuned to meet the thread tuning threshold, and may be addedto the designed application when the thread tuning threshold is met. Bydirectly comparing with the thread tuning threshold, unnecessaryrepeated thread tuning operation may be avoided, and the processingefficiency of multi-thread tuning may be improved.

For specific definitions of the thread tuning device, reference may bemade to the definition of the thread tuning method illustrated above,and details are not repeated herein. The various modules in the threadtuning device can be implemented in whole or in part by software,hardware, or any combination thereof. The modules may be embedded in orindependent of the processor in the computing device, or may be storedin the storage in the computing device in the form of software, so thatthe processor may call to execute the operations corresponding to theabove modules.

FIG. 8 is a diagram illustrating an exemplary computing device accordingto some embodiments of the present disclosure.

In some embodiments, a computing device 800 is provided. The computingdevice 800 may be a server, and its internal components may be shown inFIG. 8. The computing device 800 may include a processor 810, a storage,a network interface 850, and a database 833 connected through a systembus 820. The processor 810 of the computing device 800 may be configuredto provide computing and/or control capabilities. The storage of thecomputing device 800 may include a non-volatile storage medium 830, andan internal memory 840. The non-volatile storage medium 830 may store anoperating system 831, computer program(s) 832, and the database 833. Theinternal memory 840 may provide an environment for the operation of theoperating system 831 and the computer program(s) 832 in the non-volatilestorage medium 830. The database 833 of the computing device 800 may beconfigured to store data associated with thread tuning (e.g., the threadtuning threshold(s)). The network interface 850 of the computing device800 may be configured to communicate with an external terminal through anetwork connection. The computer program(s) 832 may be executed by theprocessor 810 to implement the thread tuning method.

It will be understood by those skilled in the art that the structureshown in FIG. 8 is merely a block diagram of a part of the structurerelated to the present disclosure, and does not constitute a limitationon the computing device to which the present disclosure scheme isapplied. The computing device may include more or fewer components thanthose shown in the figures, or some components may be combined, or havedifferent component arrangements.

In some embodiments, a computing device including a storage and aprocessor may be provided. The storage may store a computer program. Theprocessor may implement one or more of the following operations whenexecuting the computer program. A predetermined number of initialthreads may be obtained. Processing time(s) of the initial thread(s) maybe tested, under one or more distribution modes, in a parallelasynchronous processing mode. A longest processing time corresponding toa target distribution mode of the one or more distribution modes may bedetermined. The processing time(s) associated with the initial thread(s)may be adjusted, based on one or more constraint rules, under the targetdistribution mode in the parallel asynchronous processing mode. Theprocessing time for each adjusted initial thread may be determined in asingle thread mode. A thread tuning threshold associated with eachinitial thread (or each adjusted initial thread) may be identified basedon the processing time. An application program including a plurality oftarget threads may be obtained. Each target thread may be tuned underthe single thread mode based on the corresponding thread tuningthreshold.

In some embodiments, the processor may also implement one or more of thefollowing operations when executing the computer program. Constraintrule(s) may be obtained. The processing time of a thread (e.g., eachthread) of the predetermined number of initial threads may be adjustedaccording to the first constraint until the total processing time of thepredetermined number of initial threads satisfies the second constraint.

In some embodiments, the processor may also implement one or more of thefollowing operations when executing the computer program. Whether theprocessing time associated with each target thread is less than or equalto a corresponding thread tuning threshold may be determined. If not,the processing time of the target thread may be adjusted according tothe thread tuning threshold until the processing time is less than orequal to the thread tuning threshold.

In some embodiments, a computer readable non-volatile storage mediumstoring instructions is provided. The instructions, when executed by theprocessor, may cause the processor to implement one or more of thefollowing operations. A predetermined number of initial threads may beobtained. Processing time(s) of the initial thread(s) may be tested,under one or more distribution modes, in a parallel asynchronousprocessing mode. A longest processing time corresponding to a targetdistribution mode of the one or more distribution modes may bedetermined. The processing time(s) associated with the initial thread(s)may be adjusted, based on one or more constraint rules, under the targetdistribution mode in the parallel asynchronous processing mode. Theprocessing time for each adjusted initial thread may be determined in asingle thread mode. A thread tuning threshold associated with eachinitial thread (or each adjusted initial thread) may be identified basedon the processing time. An application program including a plurality oftarget threads may be obtained. Each target thread may be tuned underthe single thread mode based on the corresponding thread tuningthreshold.

In some embodiments, the instructions, when executed by the processor,may cause the processor to further implement one or more of thefollowing operations. Constraint rule(s) may be obtained. The processingtime of a thread (e.g., each thread) of the predetermined number ofinitial threads may be adjusted according to the first constraint untilthe total processing time of the predetermined number of initial threadssatisfies the second constraint.

In some embodiments, the instructions, when executed by the processor,may cause the processor to further implement one or more of thefollowing operations, Whether the processing time associated with eachtarget thread is less than or equal to a corresponding thread tuningthreshold may be determined. If not, the processing time of the targetthread may be adjusted according to the thread tuning threshold untilthe processing time is less than or equal to the thread tuningthreshold.

FIG. 9 is a flowchart illustrating an exemplary process for imageprocessing according to some embodiments of the present disclosure. Insome embodiments, the image processing operations may be performed by acomputing device (e.g., the computing device 200, the computing device1500, or the like). In some embodiments, the computing device may be aterminal 130, or may be a server. As shown in FIG. 9, the imageprocessing process may include one or more of the following operations.

In some embodiments, at least part of process 900 may be performed bythe processing device 140 (implemented in, for example, the computingdevice 200 shown in FIG. 2). For example, the process 900 may be storedin a storage device (e.g., the storage device 150, the storage 220, thestorage 390) in the form of instructions (e.g., an application), andinvoked and/or executed by the processing device 140 (e.g., theprocessor 210 illustrated in FIG. 2, the CPU 340 illustrated in FIG. 3.or one or more modules in the processing device 140 b illustrated inFIG. 14). The operations of the illustrated process presented below areintended to be illustrative. In some embodiments, the process 900 may beaccomplished with one or more additional operations not described,and/or without one or more of the operations discussed, Additionally,the order in which the operations of the process 900 as illustrated inFIG. 9 and described below is not intended to be limiting.

hi 9101, a plurality of frames may be obtained. In some embodiments, theprocessing device 140 (e.g., the image acquisition module 14610) mayperform operation 9101. In some embodiments, data associated with theplurality of frames may be generated by the scanner 110, the data may betransmitted to the processing device 140, and the processing device 140may obtain the plurality of frames based on the data. In someembodiments, each of the plurality of frames may include a plurality ofpixels. In some embodiments, each pixel may have a value (e.g., a greylevel). In the present disclosure, “frame,” “image,” and “image frame”are used interchangeably. In some embodiments, a frame may be afluoroscopic image.

In 9110, whether a current frame of the plurality of frames includes amotion may be detected.

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 9110.

The current frame may be an image acquired by an image acquisitiondevice (e.g., the scanner 110). In some embodiments, the scanner 110 maycollect data associated with a target object or a target region thereofand obtain the current frame. In some embodiments, the target objectand/or the target region may be selected according to one or moredetection needs. For example, the target object and/or the target regionmay be determined by the image processing system 100, or may be presetby a user or operator via the terminal(s) 130. In some embodiments, ifthe computing device that performs image processing operations serves animaging device, the current frame may be obtained by the imaging device.In some embodiments, the image(s) to be processed may be fluoroscopicimage(s). In some embodiments, the image(s) may include an X-ray image(also referred to as an X-ray fluoroscopic image). In some embodiments,the X-ray image may be acquired by a C-arm X-ray machine.

In some embodiments, in detecting whether the current frame of theplurality of frames includes a motion, the current frame may be comparedwith one or more previous frames, and accordingly whether the currentframe of the plurality of frames includes a motion may be determinedaccording to the comparison result (e.g., a difference between thecurrent frame and the previous frame(s) (also referred to as aninter-frame difference)). In some embodiments, the comparison may beperformed based on an inter-frame difference algorithm. Specifically, insome embodiments, the number (or count) of previous frames that need tobe used for comparison (with the current frame) may be determinedaccording to the inter-frame difference algorithm actually used. Forexample, if a general inter-frame difference algorithm is used, twoframes may be used for comparison, that is, the current frame may becompared with one previous frame. If a three-frame difference algorithmis used, three frames may be used for comparison, that is, the currentframe may be compared with two previous frames. In comparison process,the grey level of each pixel of the current frame may be directlycompared with the grey level of a corresponding pixel in one or moreprevious frames (or one or more predetermined frames). That is, a greylevel difference between a grey level of each pixel of the current frameand a grey level of a corresponding pixel of a previous frame may bedetermined. In some embodiments, the position of the each pixel of thecurrent frame and the position of the corresponding pixel of theprevious frame(s) may be the same. In some embodiments, whether thecurrent frame of the plurality of frames includes a motion may bedetermined according to the grey level difference obtained through thecomparison. In some embodiments, in determining whether or not thecurrent frame of the plurality of frames includes a motion, an imagescanning may be performed to traverse all the pixels of the image (e.g.,the current frame, and/or the previous frame(s)).

In some embodiments, a previous frame may be obtained prior to thecurrent frame. In some embodiments, the previous frame may be adjacentto the current frame. In some embodiments, there may be one or moreframes between the previous frame and the current frame. For example,ten frames (e.g., frame 1, frame 2, frame 3, . . . , frame 10) areobtained in sequence, and frame 10 is the current frame, then theprevious frame may be frame 9, or frame 8, or any other frame obtainedprior to the current frame. More descriptions of the determination ofwhether the current frame of the plurality of frames includes a motionmay be found elsewhere in the present disclosure (e.g., FIG. 10 and thedescriptions thereof).

If it is detected that the current frame includes a motion, the processmay proceed to operation 9120, otherwise the process may proceed tooperation 9130.

hi 9120, whether the current frame of the plurality of frames includes amoving object may be determined (or identified).

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 9120. In some embodiments, the currentframe may be the last frame of the plurality of frames. In someembodiments, the current frame may be any frame of the plurality offrames.

In some embodiments, if it is determined that the current frame includesa motion, whether the current frame of the plurality of frames includesa moving object may be further determined. In some embodiments, whetherthe current frame includes a motion may be detected based on inter-framedifference(s) in 9110, and whether the current frame includes a movingobject may be identified in 9120. The identification operation in 9120may reduce the possibility of false detection, and ensure that a targetimage generated based on one or more collected frames have a relativelyhigh clarity. In determining whether the current frame includes a movingobject, a (determined) moving object in the previous frame may bematched in the current frame, and a position of the moving object in thecurrent frame may be determined. In some embodiments, a positionvariation of the moving object may be determined based on the positionof the moving object in the current frame and the position of the movingobject in the previous frame. In some embodiments, whether the currentframe includes a moving object may be determined based on the positionvariation of the moving object in the current frame and the previousframe. In some embodiments, the previous frame may include one or more(e.g., 1, 2, 3, etc.) moving objects. If there are two or more movingobjects in the previous frame, each moving object may be matched in thecurrent frame (similarly as illustrated above), and whether the movingobject is still a moving object in the current frame may be determinedaccording to a respective position variation. If it is determined thatthere is at least one moving object in the current frame, it may bedetermined that the current frame of the plurality of frames includes amoving object, and the process may proceed to operation 9140. If it isdetermined that there is no moving object in the current frame, then theprocess may proceed to operation 9130.

More descriptions of the determination of whether the current frameincludes a moving object may be found elsewhere in the presentdisclosure (e.g., FIG. 11 and the descriptions thereof).

In 9130, a first count of frames may be obtained, and/or a target imagemay be generated by superimposing the first count of frames.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 9130. In some embodiments, adenoising operation may be performed on the acquired frame(s). In someembodiments, the first count of frames may be obtained (e.g., selected)from the pluraliry of frames obtained in 9101. In some embodiments, thefirst count of frames may be acquired (e.g., posterior to the pluralityof frames obtained in 9101, or the current frame) at a first frame rate.In some embodiments, a first portion of the first count of frames may beobtained from the pluraliry of frames obtained in 9101, and a secondportion of the first count of frames may be acquired at the first framerate. In some embodiments, at least a portion or all of the first countof frames may be obtained from the pluraliry of frames obtained in 9101.The first count of frames may be at a consistent frame rate or variableframe rate. In some embodiments, the frame rate(s) of the first portionof the first count of frames may be the same as or different from thefirst frame rate. In some embodiments, at least a portion of the firstcount of frames may be obtained (or generated) posterior to the currentframe. In some embodiments, at least a portion of the first count offrames may be acquired in real time (e.g., from the image acquisitionmodule 14610) at the first frame rate after the current frame isobtained, For example, the plurality of frames obtained in 9101 includeten frames (e.g., frame 1, frame 2, frame 3, . . . , frame 10), the tenframes are obtained in sequence, and frame 10 is the current frame, thenthe first count of frames may be acquired in real time at the firstframe rate and may include frame 11, frame 12, frame x, etc.Additionally, or alternatively, at least a portion of the first count offrames may be extracted from the plurality of frames. For example, theplurality of frames obtained in 9101 include 100 frames (e.g., frame 1,frame 2, frame 3, frame 100), the 100 frames are obtained in sequence,and frame 10 is the current frame, then the first count of frames may beextracted from the plurality of frames and may include, e.g., frame 2,frame 3, frame 8, frame 9, frame 13, frame 15, frame y, etc.

In some embodiments, the denoising operation may be implemented bysuperimposing the first count of frames, and the generated target imagemay have a relatively low level of noise, and may meet applicationrequirements. In some embodiments, the superimposing operation may referto a weighted averaging operation of the values of corresponding pixelsof two or more frames (e.g., the first count of frames).

For example, if the first count of frames include three frames (e.g.,frame A, frame B, frame C), then a weighted averaging may be performedon the value of a pixel of frame A, the value of a corresponding pixelof frame B, and the value of a corresponding pixel of frame C to obtainthe value of a corresponding pixel of the target image. In someembodiments, the pixel of frame A, the corresponding pixel of frame B,the corresponding pixel of frame C, and the corresponding pixel of thetarget image may have the same position.

In 9140, a second count of frames may be obtained, and/or a target imagemay be generated by superimposing the second count of frames.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 9140. In some embodiments, adenoising operation may be performed on the acquired frame(s). In someembodiments, the denoising operation may include the superimposingoperation. In some embodiments, the second count of frames may beobtained (e.g., selected) from the pluraliry of frames obtained in 9101.In some embodiments, the second count of frames may be acquired (e.g.,posterior to the plurality of frames obtained in 9101, or the currentframe) at a second frame rate. In some embodiments, a first portion ofthe second count of frames may be obtained from the pluraliry of framesobtained in 9101, and a second portion of the second count of frames maybe acquired at the second frame rate. In some embodiments, at least aportion or all of the second count of frames may be obtained from thepluraliry of frames obtained in 9101. The second count of frames may beat a consistent frame rate or variable frame rate. In some embodiments,the frame rate(s) of the first portion of the second count of frames maybe the same as or different from the second frame rate. In someembodiments, at least a portion of the second count of frames may beobtained (or generated) posterior to the current frame. In someembodiments, at least a portion of the second count of frames may beacquired in real time (e.g., from the image acquisition module 14610) atthe second frame rate after the current frame is obtained. Additionally,or alternatively, at least a portion of the second count of frames maybe extracted from the plurality of frames.

In some embodiments, the fluoroscopic images obtained in real time maybe superimposed for denoising, and thus, image noise may be reduced. Insome embodiments, the denoising process may include a filtering processincluding, for example, Gaussian low pass filtering, bilateralfiltering, mean filtering, nonlocal mean filtering, or the like, or acombination thereof. In some embodiments, the frame rate of frameacquisition (e.g., the first frame rate, and/or the second frame rate)may be related to the target object or the target region scanned by theimage acquisition device. In some embodiments, the frame rate (e.g., thefirst frame rate, and/or the second frame rate) may be determined by theimage processing system 100, or may be preset by a user or operator(according to the target object or the target region) via theterminal(s) 130. In some embodiments, the first frame rate may be setaccording to an empirical frame rate in the image denoising process, forexample, less than 30 fps.

In some embodiments, the second frame rate may be larger than the firstframe rate. That is, if a moving object is detected in the currentframe, the frame rate may be increased, i.e., the time interval in theacquisition of two adjacent frames may be reduced. By reducing the timeinterval in the acquisition of two adjacent frames, the temporalresolution of image acquisition may be increased, motion blurs inducedby the superimposing of two or more frames in the denoising process maybe reduced, thereby reducing the motion artifact induced by movingobject(s) in the image denoising process. If an image (e.g., the currentframe) includes no moving object, a relatively low frame rate may beused in image acquisition, and thus, the dose delivered in imageacquisition may be reduced. For example, if the current frame isacquired by an X-ray device, the X-ray dose may be lowered by using arelatively low frame rate when the image includes no moving object.

In some embodiments, the first count (and/or the second count) may bedetermined according to the target object or the target region scannedby the image acquisition device. That is, the first count (and/or thesecond count) may be variable for different target objects or targetregions. In some embodiments, the first count (and/or the second count)may be determined by the image processing system 100, or may be presetby a user or operator (according to the target object or the targetregion) via the terminal(s) 130. In some embodiments, the first countand/or the second count may be positive integers. For example, the firstcount or the second count may be a value in the range of 1-32. In someembodiments, the second count may be less than the first count. That is,if it is detected that the current frame includes a moving object, arelatively small count of frames may be superimposed for denoising thetarget image. If the current frame includes a moving object, thesuperimposing of a relatively large count of frames may bring obviousmotion artifacts. Therefore, the superimposing of a relatively smallcount of frames may ensure that the target image includes a relativelylow level of noise or no noise, and accordingly, the clarity of thetarget image may be improved.

In some embodiments, if it is detected that the current frame includes amoving object, the frame rate and/or the count of frames used in theimage acquisition process may be adjusted. In some embodiments, theframe rate may be increased and/or the count of images for superimposingmay be decreased, so that the motion artifacts may be reduced orremoved, and the target image may have a relatively high clarity. Insome embodiments, the frame rate may be increased while the count ofimages acquired for superimposing may remain unchanged (or the count offramed acquired for superimposing may be decreased while the frame ratemay remain unchanged), and accordingly, the artifacts may also bereduced or removed.

It should be noted that the above description of process 900 is merelyprovided for the purposes of illustration, and not intended to limit thescope of the present disclosure. For persons having ordinary skills inthe art, multiple variations and modifications may be made under theteachings of the present disclosure. However, those variations andmodifications do not depart from the scope of the present disclosure.For example, operations 9101 and/or 9110 may be omitted. In someembodiments, whether the current frame includes a moving object may bedirectly determined without detecting whether the current frame includesa motion. In some embodiments, after operation 9130 or 9140 isperformed, a next frame posterior to the current frame may be designatedas a new current frame, and the process may return to 9110. In someembodiments, before determining whether the current frame includes amoving object, whether the current frame includes a motion may bedetected, so that the count of (current) frames used for thedetermination of whether the current frame includes a moving object maybe decreased, and thus, the processing efficiency of the acquired imageframes may be improved, and resources of the processing device 140 usedin the image processing may be reduced.

FIG. 10 is a flowchart illustrating an exemplary process for detectingwhether a current frame includes a motion according to some embodimentsof the present disclosure. In some embodiments, at least part of process1000 may be performed by the processing device 140 (implemented in, forexample, the computing device 200 shown in FIG. 2). For example, theprocess 1000 may be stored in a storage device (e.g., the storage device150, the storage 220, the storage 390) in the form of instructions(e.g., an application), and invoked and/or executed by the processingdevice 140 (e.g., the processor 210 illustrated in FIG. 2, the CPU 340illustrated in FIG. 3, or one or more modules in the processing device140 b illustrated in FIG. 14). The operations of the illustrated processpresented below are intended to be illustrative. In some embodiments,the process 1000 may be accomplished with one or more additionaloperations not described, and/or without one or more of the operationsdiscussed. Additionally, the order in which the operations of theprocess 1000 as illustrated in FIG. 10 and described below is notintended to be limiting.

In some embodiments, operation 9110 illustrated in FIG. 9 may beperformed according to the process 1000. The process 1000 may includeone or more of the following operations:

In 10210, the grey level of each pixel in the current frame may becompared with the grey level of a corresponding pixel in one or moreprevious frames based on an inter-frame difference algorithm to obtain agrey level difference of the each pixel

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 10210.

In some embodiments, the grey level of each pixel in the current framemay be compared with the grey level of a corresponding pixel in aprevious frame to obtain a grey level difference of the each pixel. Insome embodiments, the grey level difference of each pixel may bedetermined by comparing the grey level of each pixel in the currentframe with the grey level of two or more previous frames according tothe inter-frame difference algorithm.

In 10220, the count of pixels in the current frame that each has a greylevel difference larger than a grey level threshold may be determined.

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 10220. The grey level threshold maybe determined by the image processing system 100, or may be preset by auser or operator via the terminal(s) 130.

In some embodiments, the grey level threshold may be a grey level withinthe noise range of the plurality of frames. In some embodiments, if thecurrent frame has no motion (relative to the previous frame), the greylevel difference of the pixels in the corresponding positions in the twoframes (e.g., the current frame and the previous frame) may besubstantially consistent or basically the same. Therefore, if the greylevel difference of a pixel is larger than the grey level threshold, itmay be determined that the pixel moves relative to the correspondingpixel of the same position in the previous frame. In sortie embodiments,the count of pixels that move relative to the previous frame may bedetermined. In some embodiments, whether the current frame includes amotion may be determined according to the count of pixels that moverelative to the previous frame,

In 10230, whether the count of pixels is larger than a first thresholdmay be determined.

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 10230.

If the count of pixels that each has a grey level difference larger thanthe grey level threshold is larger than the first threshold, it may bedetermined that the current frame includes a motion. The first thresholdmay be determined by the image processing system 100, or may be presetby a user or operator via the terminal(s) 130. In some embodiments, thefirst threshold may be obtained according to one or more factorsincluding, for example, the target object or the target region scannedby the image acquisition device, the preferences of the operator, or thelike. In some embodiments, the first threshold may be variable fordifferent image acquisitions. If the count of pixels (determined in10220) is larger than the first threshold, the process may proceed to10250, in which it may be determined that the current frame includes amotion. Otherwise, the process may proceed to 10240, in which it may bedetermined that the current frame includes no motion.

In 10240, it may be determined that the current frame includes nomotion.

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 10240.

In some embodiments, if it is determined that the current frame includesno motion, operation 9130 may be performed.

In 10250, it may be determined that the current frame includes a motion,

In some embodiments, the processing device 140 (e.g., the scanningmodule 14620) may perform operation 10250.

In some embodiments, if it is determined that the current frame includesa motion, operation 9120 may be performed.

It should be noted that the above description of process 1000 is merelyprovided for the purposes of illustration, and not intended to limit thescope of the present disclosure. For persons having ordinary skills inthe art, multiple variations and modifications may be made under theteachings of the present disclosure. However, those variations andmodifications do not depart from the scope of the present disclosure.For example, whether the current frame includes a motion may bedetermined based on a reference image matrix. The reference image matrixmay have the same size as the current frame. Each element of thereference image matrix may correspond to a pixel of the current frame.Each element of the reference image matrix may have a reference value.The reference image matrix may be determined by the image processingsystem 100, or may be preset by a user or operator via the terminal(s)130. In some embodiments, in operations 10220 and/or 10230, the currentframe may be directly compared with the reference image matrix, and aplurality of element differences between the current frame and thereference image matrix may be determined. In some embodiments, if apredetermined number of element differences is larger than 0, then itmay be determined that the current frame includes a motion.

FIG. 11 is a flowchart illustrating an exemplary process for determiningwhether the current frame includes a moving object according to someembodiments of the present disclosure. In some embodiments, at leastpart of process 1100 may be performed by the processing device 140(implemented in, for example, the computing device 200 shown in FIG. 2).For example, the process 1100 may be stored in a storage device (e.g.,the storage device 150, the storage 220, the storage 390) in the form ofinstructions (e.g., an application), and invoked and/or executed by theprocessing device 140 (e.g., the processor 210 illustrated in FIG. 2.the CPU 340 illustrated in FIG. 3, or one or more modules in theprocessing device 140 b illustrated in FIG. 14). The operations of theillustrated process presented below are intended to be illustrative. Insome embodiments, the process 1100 may be accomplished with one or moreadditional operations not described, and/or without one or more of theoperations discussed. Additionally, the order in which the operations ofthe process 1100 as illustrated in FIG. 11 and described below is notintended to be limiting.

In some embodiments, operation 9120 illustrated in FIG. 9 may beperformed according to the process 1100. The process 1100 may includeone or more of the following operations:

In 11310, one or more moving objects in a previous frame may beobtained.

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11310.

In some embodiments, the moving object(s) in the previous frame may beobtained and/or stored in the image processing process of the previousframe, so that in the processing of the current frame, the movingobject(s) may be directly obtained. In operation 11310, the obtaining ofthe moving object(s) may refer to obtaining one or more sub-imagesassociated with the moving object(s) in the previous frame (e.g.,sub-images of the moving object(s) extracted from the previous frame).If the previous frame includes one or more moving objects, each of theone or more moving objects may be obtained. In some embodiments, amoving object may refer to a portion of the pixels in a frame. In someembodiments, the moving object(s) in the previous frame may bedetermined based on one or more image segmentation algorithms. Exemplarysegmentation algorithms may include a threshold segmentation, a regiongrowing segmentation, an energy-based 3D reconstruction segmentation, alevel set-based segmentation, a region split and/or merge segmentation,an edge tracing segmentation, a statistical pattern recognition, aC-means clustering segmentation, a deformable model segmentation, agraph search segmentation, a neural network segmentation, a geodesicminimal path segmentation, a target tracking segmentation, anatlas-based segmentation, a rule-based segmentation, a coupled surfacesegmentation, a model-based segmentation, a deformable organismsegmentation, or the like, or any combination thereof. In someembodiments, the moving object(s) in the previous frame may bedetermined based on one or more pixels of the previous frame that eachhas a grey level difference larger than the grey level threshold. Forexample, a connected domain including at least a portion of the pixelsmay be determined as a moving object. As another example, a regionincluding at least a portion of the pixels in which a distance betweeneach two adjacent pixels is less than a threshold may be determined as amoving object. As a further example, a region including the pixels maybe directedly determined as a moving object. In some embodiments, thepixels of the previous frame that each has a grey level differencelarger than the grey level threshold may be determined according to oneor more operations of the process 1000.

In 11320, a first position of each moving object (of the previous frame)in the current frame may be determined by performing matching of theeach moving object (of the previous frame) in the current frame (withthe moving object in the previous frame).

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11320.

In some embodiments, each moving object in the previous frame may bematched in the current frame, and the position of a corresponding(candidate) moving object in the current frame may be determined. Insortie embodiments, in the matching process, a full frame matching maybe performed. A full frame matching may refer that all pixels in thecurrent frame may be used to be matched with the moving object in theprevious frame. In some embodiments, the matching may be performed in anestimated region of the current frame. The estimated region may bedetermined according to a movement model of the moving object. In someembodiments, if the movement model is used, the full frame matching maynot be required. Therefore, the computation amount may be reduced, andthe processing efficiency may be improved.

In some embodiments, the movement model of a moving object may begenerated based on a plurality of previous frames obtained prior to thecurrent frame. For example, the movement model may be generated based onthe positions of the moving object in the plurality of previous frames.In some embodiments, each moving object may have a correspondingmovement model The movement models of different moving objects may bethe same or different.

In 11330, an offset between the first position of the each moving objectin the current frame and a second position of the each moving object inthe previous frame may be determined.

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11330.

In some embodiments, the position of the moving object in the currentframe may be compared with the position of the moving object in theprevious frame to obtain a position variation of the moving object(i,e., an offset).

In some embodiments, the offset may be denoted by a vector including anorientation (of the moving object between the current frame and theprevious frame) and/or a distance (of the moving object between thecurrent frame and the previous frame).

In 11340, whether the offset of at least one moving object is smallerthan or equal to a second threshold may be determined.

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11340.

In some embodiments, if the offset of a moving object is less than orequal to the second threshold, it may be determined that the movingobject is in a stationary state in the current frame. If the offset(s)of one or more moving objects are larger than the second threshold, itmay be determined that the moving object(s) are in a motion state in thecurrent frame, thereby it may be determined that the current frameincludes a moving object. That is, if there are two or more movingobjects in the current frame, and it is determined that at least oneobject is in a motion state in the current frame, then it may bedetermined that the current frame includes a moving object, and theprocess may proceed to operation 11350. If it is determined that all themoving objects are in a static state in the current frame, then it maybe determined that the current frame includes no moving object, and theprocess may proceed to operation 11360.

In 11350, it may be determined that the current frame of the pluralityof frames includes a moving object.

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11350.

In some embodiments, if it is determined that the current frame of theplurality of frames includes a moving object, operation 9140 may beperformed.

In 11360, it may be determined that the current frame includes no movingobject.

In some embodiments, the processing device 140 (e.g., the tracing module14630) may perform operation 11360.

In some embodiments, if it is determined that the current frame includesno moving object, that is, the current frame is static relative to theprevious frame, operation 9130 may be performed.

In some embodiments, if it is determined that the offset of the movingobject is larger than the second threshold, it may be determined thatthe moving object is in a motion state in the current frame. In someembodiments, the position of the moving object that is in the motionstate in the current frame may be stored. In some embodiments, themovement model of the moving object may be generated based on thepositions of the moving object in a plurality of frames that arepreviously collected. Specifically, in some embodiments, the movementmodel(s) of the moving object(s) may be generated based on a pointspread function. In some embodiments, in 11320, the position of themoving object in the current frame may be estimated according to themovement model, and the matching may be performed in a region around theestimated position, and the full frame matching may not be required.Therefore, the computation amount may be reduced, and the processingefficiency may be improved.

In some embodiments, if the previous frame includes a moving object, butthe current frame does not include the moving object, that is, themoving object does not exist in the current frame, then an initialposition of the moving object may be marked in the current frame. Insome embodiments, it may be convenient to estimate the position of themoving object in the processing of a next frame posterior to the currentframe based on the marked initial position of the moving object. In someembodiments, the movement of the moving object in a plurality of framemay be periodic. Therefore, the position of the moving object may bedetermined based on the marked initial position. In some embodiments,the initial position of the moving object may refer to the position ofthe moving object in a frame in which the moving object is detected forthe first time.

It should be noted that the above description of process 1000 is merelyprovided for the purposes of illustration, and not intended to limit thescope of the present disclosure. For persons having ordinary skills inthe art, multiple variations and modifications may be made under theteachings of the present disclosure. However, those variations andmodifications do not depart from the scope of the present disclosure.For example, before operation 11310, an operation for determining one ormore moving objects existing in the previous frame may be added.

FIG. 12 is a flowchart illustrating an exemplary process for adjustingthe second count according to some embodiments of the presentdisclosure. In some embodiments, at least part of process 1200 may beperformed by the processing device 140 (implemented in, for example, thecomputing device 200 shown in FIG. 2). For example, the process 1200 maybe stored in a storage device (e.g., the storage device 150, the storage220, the storage 390) in the form of instructions (e.g., anapplication), and invoked and/or executed by the processing device 140(e.g., the processor 210 illustrated in FIG. 2, the CPU 340 illustratedin FIG. 3, or one or more modules in the processing device 140 billustrated in FIG. 14). The operations of the illustrated processpresented below are intended to be illustrative. In some embodiments,the process 1200 may be accomplished with one or more additionaloperations not described, and/or without one or more of the operationsdiscussed. Additionally, the order in which the operations of theprocess 1200 as illustrated in FIG. 12 and described below is notintended to be limiting.

In some embodiments, the process(es) illustrated above may furtherinclude the operations illustrated in FIG. 12. The process 1200 mayinclude one or more of the following operations:

In 12410, the pixels of identified moving object(s) in the current framethat have an offset larger than the second threshold may be marked asmoving pixels.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 12410.

In some embodiments, in the marking process, the moving pixels in thecurrent frame may be marked using different colors or symbols,characters, etc. In some embodiments the positions of the moving pixelsin the current frame may be stored for further use.

In 12420, a count of the moving pixels in the current frame may bedetermined.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 12420.

In some embodiments, the movement intensity of the moving objects in aframe may be related to the count of pixels in the frame that havechanged positions, that is, related to the count of moving pixels. If aframe has a relatively large count of moving pixels, the movementintensity of the moving object(s) in the frame may be relatively large.

In 12430, the second count may be adjusted based on the count of themoving pixels in the current frame.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 12430. In some embodiments, thesecond count and the count of the moving pixels may have a negativecorrelation. In some embodiments, if the count of the moving pixelsincreases, the second count may be decreased. In some embodiments, thecorrelation between the second count and the count of the moving pixelsmay be denoted by a table.

In some embodiments, a correspondence table between the second count andthe count of the moving pixels may be stored in advance. In thecorrespondence table, if the count of the moving pixels is relativelylarge, the second count may be relatively small. Therefore, the secondcount may be determined based on the correspondence table and the countof the moving pixels.

FIG. 13 is a flowchart illustrating an exemplary process for adjustingthe second frame rate according to some embodiments of the presentdisclosure. In some embodiments, at least part of process 1300 may beperformed by the processing device 140 (implemented in, for example, thecomputing device 200 shown in FIG. 2). For example, the process 1300 maybe stored in a storage device (e.g., the storage device 150, the storage220, the storage 390) in the form of instructions (e.g., anapplication), and invoked and/or executed by the processing device 140(e.g., the processor 210 illustrated in FIG. 2, the CPU 340 illustratedin FIG. 3, or one or more modules in the processing device 140 billustrated in FIG. 14). The operations of the illustrated processpresented below are intended to be illustrative. In some embodiments,the process 1300 may be accomplished with one or more additionaloperations not described, and/or without one or more of the operationsdiscussed. Additionally, the order in which the operations of theprocess 1300 as illustrated in FIG. 13 and described below is notintended to be limiting.

In some embodiments, the process(es) illustrated above may furtherinclude the operations illustrated in FIG. 13. The process 1300 mayinclude one or more of the following operations:

In 13510, the pixels of identified moving object(s) in the current framethat have an offset larger than the second threshold may be marked asmoving pixels

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 13510.

In 13520, a count of the moving pixels in the current frame may bedetermined.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 13520.

In 13530, the second frame rate may be adjusted based on the count ofthe moving pixels in the current frame.

In some embodiments, the processing device 140 (e.g., the blur removalmodule 14640) may perform operation 13530. In some embodiments, thesecond frame rate and the count of the moving pixels may have a positivecorrelation. In some embodiments, if the count of the moving pixelsincreases, the second frame rate may be increased. In some embodiments,the correlation between the second frame rate and the count of themoving pixels may be denoted by a table.

In some embodiments, a correspondence table between the second framerate and the count of the moving pixels may be stored in advance. In thecorrespondence table, if the count of the moving pixels is relativelylarge, the second frame rate may be relatively large. Therefore, thesecond frame rate may be determined based on the correspondence tableand the count of the moving pixels in the current frame.

In some embodiments, if it is determined in 9120 that the current frameof the plurality of frames includes a moving object, the motiondisplacement of the moving object may be further determined. The motiondisplacement of the moving object may be the offset of the moving objectbetween the current frame and the previous frame. That is, the positionin the current frame may be compared with the position in the previousframe to obtain the motion displacement. According to the motiondisplacement, the movement intensity of the moving object in the currentframe may be determined. Therefore, the second count may be adjustedaccording to the motion displacement, so that the second count decreasesas the motion displacement increases, thereby avoiding the motionartifacts induced by the superimposing process of two or more frames.

FIG. 14 is a block diagram illustrating an exemplary processing deviceaccording to some embodiments of the present disclosure.

In some embodiments, as shown in FIG. 14, an exemplary image processingdevice is provided. Referring to FIG. 14, the processing device 140 bmay include an image acquisition module 14610, a scanning module 14620,a tracing module 14630, and a blur removal module 14640. The imageacquisition module 14610 may be configured to collect one or moreimages. The scanning module 14620 may be configured to detect whether acurrent frame includes a motion. The tracing module 14630 may beconfigured to determine whether the current frame includes a movingobject. The blur removal module 14640 may be configured to acquire afirst count of frames at a first frame rate for superimposing if thetracing module 14630 determines that the current frame includes nomoving object. If the tracing module 14630 determines that the currentframe of the plurality of frames incudes a moving object, the blurremoval module 14640 may acquire a second count of frames at a secondframe rate for superimposing. In some embodiments, the second frame ratemay be larger than the first frame rate, and/or the second count may beless than the first count. The second count and the first count may bepositive integers.

In some embodiments, the image acquisition module 14610 may acquire oneor more fluoroscopic images, e.g., one or more X-ray fluoroscopicimages. In some embodiments, the image acquisition module 14610 mayinclude a radiation source and a detector. The radiation source may beconfigured to generate X-rays, The detector may detect X-rays that passthrough the target region or target object, and/or generate X-rayfluoroscopic image(s). In some embodiments, the image acquisition module14610 may be set in the scanner 110 (e.g., a C-arm device).

In some embodiments, the blur removal module 14640 may include a framerate adjustment unit 14642 and/or an image count adjustment unit 14644.The frame rate adjustment unit 14642 may be configured to acquire thefirst count of frames at the first frame rate for superimposing inresponse to the tracing module 14630 determining that the current frameincludes no moving object. The image count adjustment unit 14644 may beconfigured to acquire the second count of frames at the second framerate for superimposing in response to the tracing module 14630determining that the current frame of the plurality of frames includes amoving object.

In some embodiments, the scanning module 14620 may be configured tocompare the grey level of each pixel in the current frame with the greylevel of a corresponding pixel in the previous frame according to aninter-frame difference algorithm to obtain a grey level difference ofthe each pixel. The scanning module 14620 may be further configured todetermine the count of pixels that each has a grey level differencelarger than a grey level threshold in the current frame. In someembodiments, the scanning module 14620 may determine that the currentframe includes a motion in response to a determination that the count ofpixels is larger than a first threshold. In some embodiments, thescanning module 14620 may determine that the current frame includes nomotion in response to a determination that the count of pixels is lessthan or equal to the first threshold.

In some embodiments, the tracing module 14630 may be further configuredto obtain one or more moving objects in the previous frame. In someembodiments, the tracing module 14630 may match each moving object ofthe previous frame in the current frame to determine the position of themoving object in the current frame. In some embodiments, the tracingmodule 14630 may determine the offset of each moving object between theprevious frame and then current frame. In some embodiments, the tracingmodule 14630 may determine that the current frame of the plurality offrames includes a moving object in response to determining that at leastone of the moving objects has an offset larger than a second threshold.In some embodiments, the tracing module 14630 may determine that thecurrent frame includes no moving object in response to determining thatthe offset of each moving object is less than or equal to the secondthreshold.

In some embodiments, the processing device 140 b may further include astorage module for storing the positions of the moving objects that havean offset larger than the second threshold in the current frame.

In some embodiments, the processing device 140 b may further include amovement model determination module 14650. The movement modeldetermination module 14650 may be configured to generate a movementmodel of each moving object based on one or more images that arecollected prior to the current frame. In some embodiments, the tracingmodule 14630 may estimate the position of a moving object in the currentframe according to the movement model, and match the moving object ofthe previous frame in a region around the estimated position of thecurrent frame to determine the position of the moving object in thecurrent frame.

In some embodiments, the movement model determination module 14650 maybe further configured to mark an initial position of the moving objectin the current frame in response to determining that the previous frameincludes a moving object but the current frame does not include themoving object. Accordingly, the tracing module 14630 may estimate theposition of the moving object in a next frame posteriors to the currentframe. The scanning module 14620, the tracing module 14630, and themovement model determination module 14650 may cooperate to improve thedetection accuracy of moving object(s).

In some embodiments, the tracing module 14630 may be further configuredto mark each pixel of the moving object that has an offset larger thanthe second threshold as a moving pixel, and determine the count ofmoving pixels in the current frame. The image count adjustment unit14644 may be configured to adjust the second count according to thecount of moving pixels in the current frame, so that the second countmay decrease as the count of moving pixels increases. In someembodiments, the storage module may be further configured to store acorrespondence table associated with a correlation between the secondcount and the count of moving pixels, so that the image count adjustmentunit 14644 may determine the second count according to thecorrespondence table.

In some embodiments, the frame rate adjustment unit 14642 may beconfigured to adjust the second frame rate according to the count ofmoving pixels, so that the second frame rate may increases as the countof moving pixels increases.

In some embodiments, the tracing module 14630 may be further configuredto determine a motion displacement of the moving object in response to adetermination that the current frame include a moving object. The imagecount adjustment unit 14644 may adjust the second count according to themotion displacement such that the second count may decrease as themotion displacement increases. In some embodiments, the correspondencetable associated with a correlation between the motion displacement andthe second count may be stored in advance for further use.

FIG. 15 is a block diagram illustrating an exemplary computing deviceaccording to some embodiments of the present disclosure.

In some embodiments, an exemplary computing device is provided. Thecomponents of the computing device 1500 is shown in FIG. 15. Thecomputing device 1500 may include a processor 1510, a storage, and anetwork interface 1550 connected through a system bus 1520. Theprocessor 1510 of the computing device 1500 may be configured to providecomputing and/or control capabilities. The storage of the computingdevice 1500 may include a non-volatile storage medium 1530 and aninternal memory 1540. The non-volatile storage medium 1530 may store anoperating system 1531 and computer program(s) 1532. The internal memory1540 may provide an environment for the operation of the operatingsystem 1531 and computer program(s) 1532 in the non-volatile storagemedium 1530. The network interface 1550 of the computing device 1500 maybe configured to communicate with an external terminal through a networkconnection. The computer program(s) 1532 may be executed by theprocessor 1510 to implement the operations of the image processingmethod illustrated in the present disclosure. It may be understood bythose skilled in the art that the structure shown in FIG. 15 is merely ablock diagram of a part of the structure related to the presentdisclosure, and does not constitute a limitation on the computing deviceto which the present disclosure scheme is applied. The computing devicemay include more or fewer components than those shown in the figures, orsome components may be combined, or have different componentarrangements.

In some embodiments, a computing device including a storage and aprocessor may be provided. The storage may store a computer program. Theprocessor may implement one or more of the operations illustrated abovewhen executing the computer program.

In some embodiments, a computer readable non-volatile storage mediumstoring instructions may be provided. The instructions, when executed bythe processor, may cause the processor to implement one or more of theoperations illustrated above.

FIG. 16 is a flowchart illustrating an exemplary process for tuningthreads of an image processing program according to some embodiments ofthe present disclosure. In some embodiments, at least part of process1600 may be performed by the processing device 140 (implemented in, forexample, the computing device 200 shown in FIG. 2). For example, theprocess1600 may be stored in a storage device (e.g., the storage device150, the storage 220, the storage 390) in the form of instructions(e.g., an application), and invoked and/or executed by the processingdevice 140 (e.g., the processor 210 illustrated in FIG. 2, the CPU 340illustrated in FIG. 3, one or more modules in the processing device 140a illustrated in FIG. 7, and/or one or more modules in the processingdevice 140 b illustrated in FIG. 14). The operations of the illustratedprocess presented below are intended to be illustrative. In someembodiments, the process 1600 may be accomplished with one or moreadditional operations not described, and/or without one or more of theoperations discussed. Additionally, the order in which the operations ofthe process 1600 as illustrated in FIG. 16 and described below is notintended to be limiting.

In 1602, a predetermined number of initial threads associated with animage processing program may be obtained.

In some embodiments, the processing device 140 (e.g., the obtainingmodule 7406) may perform operation 1602. In some embodiments, theinitial threads may be obtained from one or more storage devices (e.g.,the storage device 150, the storage 220, and/or the storage 390) and/oran external data source. In some embodiments, the predetermined numbermay be set by the user. In some embodiments, the image processingprogram may include one or more operations illustrated in FIGS. 9-13. Insome embodiments, the image processing program may include one or moretarget threads. In some embodiments, the predetermined number may bedetermined according to the number (or count) of target threads in theimage processing program. More descriptions of the initial threads, thetarget threads, and/or the obtaining of initial threads may be foundelsewhere in the present disclosure (e.g., FIG. 4 and descriptionsthereof).

In 1604, a first processing time (e.g., a total processing time) for theinitial threads may be tested under each of one or more (predetermined)distribution modes, and/or in a parallel asynchronous processing mode.In some embodiments, the first processing time associated with theinitial threads may include a processing time of each initial thread,and/or a total processing time of the initial threads. In someembodiments, a total processing time of the initial threads may betested under each distribution mode, and thus, one or more (total)processing times may be determined. More descriptions of thedistribution modes, and the testing of the processing time of theinitial threads may be found elsewhere in the present disclosure (e.g.,FIG, 4 and descriptions thereof).

In 1606, a longest first processing time corresponding to a targetdistribution mode of the one or more distribution modes may bedetermined. In some embodiments, the processing device 140 (e.g., theadjustment module 7404) may perform operation 1606. In some embodiments,the target distribution mode may refer to a distribution mode that has alongest processing time, i.e., a distribution mode that has the lowestload performance. The longest processing time may be determined based onthe one or more (total) processing times tested in 1604. Moredescriptions of the target distribution mode may be found elsewhere inthe present disclosure (e,g., FIG. 4 and descriptions thereof).

In 1608, the first processing time associated with the initial threadsmay be adjusted, based on one or more constraint rules, under the targetdistribution mode in the parallel asynchronous processing mode. In someembodiments, the processing device 140 (e.g., the adjustment module7404) may perform operation 1608. In some embodiments, the processingtime of each initial thread may be adjusted. More descriptions of theconstraint rules, and the adjustment of the first processing timeassociated with the initial threads may be found elsewhere in thepresent disclosure (e.g., FIGS. 4-5, and descriptions thereof).

In 1610, a second processing time for each adjusted initial thread maybe determined in a single thread mode. In some embodiments, theprocessing device 140 (e.g., the determination module 7408) may performoperation 1610. More descriptions of the determination of the processingtime for each adjusted initial thread may be found elsewhere in thepresent disclosure (e.g., FIG. 4 and descriptions thereof).

In 1612, a thread tuning threshold associated with each initial thread(or each adjusted initial thread) may be identified based on the secondprocessing time. In some embodiments, the processing device 140 (e.g.,the determination module 7408) may perform operation 1612. In someembodiments, a plurality of thread tuning thresholds associated with theplurality of initial thread may be identified. The plurality of threadtuning thresholds may be the same or different. More descriptions of theidentification of the thread tuning threshold(s) may be found elsewherein the present disclosure (e.g., FIG. 4 and descriptions thereof).

In 1614, a plurality of target threads of the image processing programmay be obtained. In some embodiments, the processing device 140 (e.g.,the obtaining module 7406) may perform operation 1614. In someembodiments, the target threads may include a first thread associatedwith processing an image frame at a first frame rate, and/or a secondthread associated with processing the image frame at a second framerate. In some embodiments, the target threads may include a third threadassociated with determining whether a current frame includes a movingobject, and/or a fourth thread associated with acquiring a certain count(e.g., the first count, the second count) of frames at a certain framerate (e.g., the first frame rate, the second frame rate), and/orprocessing the acquired frames. In some embodiments, the target threadsmay include a fifth thread associated with processing frame(s), and/or asixth thread associated with generating a movement model. In someembodiments, the number (count) of the plurality of target threads maybe equal to the predetermined number. In some embodiments, each targetthread may correspond to an initial thread (or adjusted initial thread).In some embodiments, the computation amount, the computational manner,the computation algorithm(s), and/or the processing algorithm(s), or thelike, of (or used in) each target thread may be similar to that of (orused in) a corresponding initial thread (or adjusted initial thread). Insome embodiments, operation 1614 may be performed before operation 1602,and the predetermined number may be determined according to the count ofthe target threads. More descriptions of obtaining of the target threadsmay be found elsewhere in the present disclosure (e.g., FIG. 4, anddescriptions thereof).

In 1616, an adjusted image processing program may be obtained by tuningthe each target thread under the single thread mode based on acorresponding thread tuning threshold associated with a correspondinginitial thread (or a corresponding adjusted initial thread). In someembodiments, the processing device 140 (e.g., the tuning module 7410)may perform operation 1616. More descriptions of thread tuning may befound elsewhere in the present disclosure (e.g., FIGS. 4 and 6, and thedescriptions thereof).

Having thus described the basic concepts, it may be rather apparent tothose skilled in the art after reading this detailed disclosure that theforegoing detailed disclosure is intended to be presented by way ofexample only and is not limiting. Various alterations, improvements, andmodifications may occur and are intended to those skilled in the art,though not expressly stated herein. These alterations, improvements, andmodifications are intended to be suggested by this disclosure, and arewithin the spirit and scope of the exemplary embodiments of thisdisclosure.

Moreover, certain terminology has been used to describe embodiments ofthe present disclosure. For example, the terms “one embodiment,” “anembodiment,” and/or “some embodiments” mean that a particular feature,structure or characteristic described in connection with the embodimentis included in at least one embodiment of the present disclosure.Therefore, it is emphasized and should be appreciated that two or morereferences to “an embodiment” or “one embodiment” or “an alternativeembodiment” in various portions of this specification are notnecessarily all referring to the same embodiment. Furthermore, theparticular features, structures or characteristics may be combined assuitable in one or more embodiments of the present disclosure.

Further, it will be appreciated by one skilled in the art, aspects ofthe present disclosure may be illustrated and described herein in any ofa number of patentable classes or context including any new and usefulprocess, machine, manufacture, or composition of matter, or any new anduseful improvement thereof. Accordingly, aspects of the presentdisclosure may be implemented entirely hardware, entirely software(including firmware, resident software, micro-code, etc,) or combiningsoftware and hardware implementation that may all generally be referredto herein as a “unit,” “module,” or “system,” Furthermore, aspects ofthe present disclosure may take the form of a computer program productembodied in one or more computer readable media having computer readableprogram code embodied thereon.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including electro-magnetic, optical, or thelike, or any suitable combination thereof. A computer readable signalmedium may be any computer readable medium that is not a computerreadable storage medium and that may communicate, propagate, ortransport a program for use by or in connection with an instructionexecution system, device, or device. Program code embodied on a computerreadable signal medium may be transmitted using any appropriate medium,including wireless, wireline, optical fiber cable. RF, or the like, orany suitable combination of the foregoing.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB. NET,Python or the like, conventional procedural programming languages, suchas the “C” programming language, Visual Basic, Fortran 2103, Perl, COBOL2102, PHP. ABAP, dynamic programming languages such as Python, Ruby andGroovy, or other programming languages. The program code may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider) or in a cloud computing environment or offered as aservice such as a Software as a Service (SaaS).

Furthermore, the recited order of processing elements or sequences, orthe use of numbers, letters, or other designations therefore, is notintended to limit the claimed processes and methods to any order exceptas may be specified in the claims. Although the above disclosurediscusses through various examples what is currently considered to be avariety of useful embodiments of the disclosure, it is to be understoodthat such detail is solely for that purpose, and that the appendedclaims are not limited to the disclosed embodiments, but, on thecontrary, are intended to cover modifications and equivalentarrangements that are within the spirit and scope of the disclosedembodiments. For example, although the implementation of variouscomponents described above may be embodied in a hardware device, it mayalso be implemented as a software only solution, e.g., an installationon an existing server or mobile device.

Similarly, it should be appreciated that in the foregoing description ofembodiments of the present disclosure, various features are sometimesgrouped together in a single embodiment, figure, or description thereoffor the purpose of streamlining the disclosure aiding in theunderstanding of one or more of the various inventive embodiments. Thismethod of disclosure, however, is not to be interpreted as reflecting anintention that the claimed subject matter requires more features thanare expressly recited in each claim. Rather, inventive embodiments liein less than all features of a single foregoing disclosed embodiment.

In some embodiments, the numbers expressing quantities or propertiesused to describe and claim certain embodiments of the application are tobe understood as being modified in some instances by the term “about,”“approximate,” or “substantially.” For example, “about,” “approximate,”or “substantially” may indicate ±20% variation of the value itdescribes, unless otherwise stated. Accordingly, in some embodiments,the numerical parameters set forth in the written description andattached claims are approximations that may vary depending upon thedesired properties sought to be obtained by a particular embodiment. Insome embodiments, the numerical parameters should be construed in lightof the number of reported significant digits and by applying ordinaryrounding techniques. Notwithstanding that the numerical ranges andparameters setting forth the broad scope of some embodiments of theapplication are approximations, the numerical values set forth in thespecific examples are reported as precisely as practicable.

Each of the patents, patent applications, publications of patentapplications, and other material, such as articles, books,specifications, publications, documents, things, and/or the like,referenced herein is hereby incorporated herein by this reference in itsentirety for all purposes, excepting any prosecution file historyassociated with same, any of same that is inconsistent with or inconflict with the present document, or any of same that may have alimiting affect as to the broadest scope of the claims now or laterassociated with the present document. By way of example, should there beany inconsistency or conflict between the description, definition,and/or the use of a term associated with any of the incorporatedmaterial and that associated with the present document, the description,definition, and/or the use of the term in the present document shallprevail.

In closing, it is to be understood that the embodiments of theapplication disclosed herein are illustrative of the principles of theembodiments of the application. Other modifications that may be employedmay be within the scope of the application. Thus, by way of example, butnot of limitation, alternative configurations of the embodiments of theapplication may be utilized in accordance with the teachings herein.Accordingly, embodiments of the present application are not limited tothat precisely as shown and described.

1. A method implemented on at least one machine each of which has atleast one processor and at least one storage device for imageprocessing, the method comprising: obtaining a plurality of frames, eachof the plurality of frames comprising a plurality of pixels;determining, based on the plurality of frames, whether a current frameof the plurality of frames comprises a moving object; in response todetermining that the current frame includes no moving object, obtaininga first count of frames; generating a target image by superimposing thefirst count of frames; in response to determining that the current frameincludes a moving object, obtaining a second count of frames; andgenerating the target image by superimposing the second count of frames.2. The method of claim 1, wherein in response to determining that thecurrent frame includes no moving object, the obtaining a first count offrames comprises at least one of: acquiring the first count of frames ata first frame rate; obtaining the first count of frames from theplurality of frames; or obtaining a first portion of the first count offrames from the plurality of frames, and acquiring a second portion ofthe first count of frames at a first frame rate.
 3. The method of claim2, wherein in response to determining that the current frame includes amoving object, the obtaining a second count of frames comprises at leastone of: acquiring the second count of frames at a second frame rate;obtaining the second count of frames from the plurality of frames; orobtaining a first portion of the second count of frames from theplurality of frames, and acquiring a second portion of the second countof frames at a second frame rate.
 4. The method of claim 3, wherein thesecond frame rate is larger than the first frame rate. or the secondcount is smaller than the first count.
 5. (canceled)
 6. The method ofclaim 3, further comprising: detecting whether the current framecomprises a motion, wherein the detecting whether the current framecomprises the motion comprises: comparing a grey level of at least onepixel of the current frame with a grey level of a corresponding pixel ofa previous frame obtained prior to the current frame of the plurality offrames; and determining whether the current frame comprises the motionbased on a comparison result.
 7. The method of claim 6, wherein thecomparing a grey level of at least one pixel of the current frame with agrey level of a corresponding pixel of a previous frame obtained priorto the current frame of the plurality of frames comprises: determining agrey level difference between a grey level of each pixel of the currentframe and a grey level of a corresponding pixel of the previous frame.8. The method of claim 7, wherein determining whether the current framecomprises the motion based on a comparison result comprises: determininga third count of pixels of the current frame that each has a grey leveldifference with a grey level of a corresponding pixel larger than a greylevel threshold; comparing the third count with a first threshold; andin response to determining that the third count is larger than the firstthreshold, determining the current frame comprises the motion; or inresponse to determining that the third count is smaller than or equal tothe first threshold, determining the current frame comprises no motion.9. The method of claim 6, wherein determining, based on the plurality offrames, whether a current frame of the plurality of frames comprises amoving object comprises: determining one or more moving objects existingin the previous frame; obtaining the one or more moving objects in theprevious frame; for each of the one or more moving objects, determininga first position of the each moving object in the current frame byperforming matching of the each moving object in the current frame witha corresponding moving object in the previous frame; determining anoffset between the first position of the each moving object in thecurrent frame and a second position of the each moving object in theprevious frame; determining whether the offset of at least one of theone or more moving objects is larger than a second threshold; and inresponse to determining that the offset of at least one of the one ormore moving objects is larger than the second threshold, determining thecurrent frame comprises a moving object; and in response to determiningthat the offsets of the one or more moving objects are smaller than orequal to the second threshold, determining the current frame comprisesno moving object.
 10. The method of claim 9, further comprising: inresponse to determining that the offset of at least one of the one ormore moving objects is larger than the second threshold, storing, in astorage device, the first position of the at least one of the one ormore moving objects in the current frame adjusting the second countbased on the offset.
 11. The method of claim 9, further comprising:generating a movement model for each moving object of the one or moremoving objects based on a plurality of previous frames obtained prior tothe current frame of the plurality of frames.
 12. The method of claim11, wherein the determining a first position of the each moving objectin the current frame by performing matching of the each moving object inthe current frame comprises: for each of the one or more moving objects,estimating a position of the each moving object in the current framebased on a movement model corresponding to the each moving object; anddetermining the first position of the each moving object in the currentframe based on the estimated position.
 13. The method of claim 9,further comprising: in response to determining that the previous frameincludes a specific moving object but the current frame does not includethe specific moving object, marking an initial position of the movingobject in the current frame.
 14. The method of claim 9, furthercomprising: marking the pixels of one or more determined moving objectsin the current frame that have an offset larger than the secondthreshold as moving pixels; and adjusting the second count or the secondframe rate based on a fourth count of the moving pixels in the currentframe. 15-23. (canceled)
 24. A method implemented on at least onemachine each of which has at least one processor and at least onestorage device for thread tuning, the method comprising: obtaining apredetermined number of initial threads; testing, under each of one ormore distribution modes, a first processing time for the initial threadsin a parallel asynchronous processing mode; determining a longest firstprocessing time corresponding to a target distribution mode of the oneor more distribution modes; adjusting, under the target distributionmode based on one or more constraint rules, the first processing timeassociated with the initial threads in the parallel asynchronousprocessing mode; determining a second processing time for each adjustedinitial thread in a single thread mode; identifying a thread tuningthreshold associated with each initial thread based on the secondprocessing time; obtaining an application program including thepredetermined number of target threads, each target thread of thepredetermined number of target threads corresponding to a respectiveinitial thread; and tuning each target thread under the single threadmode based on a corresponding thread tuning threshold associated with acorresponding initial thread.
 25. The method of claim 24, wherein theone or more constraint rules include a first constraint for a thirdprocessing time of each initial thread in the parallel asynchronousprocessing mode, and a second constraint for a total processing time ofthe initial threads in the parallel asynchronous processing mode. 26.The method of claim 25, wherein the adjusting, based on one or moreconstraint rules, the first processing time associated with the initialthreads under the target distribution mode in the parallel asynchronousprocessing mode comprises: under the target distribution mode, adjustinga processing time of each of the initial threads, so that the processingtime of each adjusted initial thread satisfies the first constraintrelating to the each adjusted initial thread, until a total processingtime of the adjusted initial threads satisfies the second constraint.27. (canceled)
 28. The method of claim 24, wherein tuning each targetthread under the single thread mode based on the thread tuning thresholdassociated with a corresponding initial thread comprises: comparing athird processing time for the each target thread under the single threadmode with the corresponding thread tuning threshold; in response todetermining that the third processing time for the each target threadunder the single thread mode is larger than the corresponding threadtuning threshold, adjusting the each target thread until the thirdprocessing time for the each target thread is smaller than or equal tothe corresponding thread tuning threshold.
 29. The method of claim 28,wherein the adjusting the each target thread comprises at least one of:adjusting one or more program codes of the each target thread: adding anew thread to share a working burden of the each target thread; oradjusting the each target thread while keeping the count of the adjustedtarget threads equal to the predetermined number. 30-31. (canceled) 32.The method of claim 24, wherein the one or more predetermineddistribution modes include at least two of a first distribution mode inwhich the total processing time of the initial threads is evenlyallocated among the initial threads; a second distribution mode in whichthe total processing time of the initial threads is allocated from smallto large among the initial threads; and a third distribution mode inwhich the total processing time of the initial threads is allocated fromlarge to small among the initial threads.
 33. A method implemented on atleast one machine each of which has at least one processor and at leastone storage device for thread tuning, the method comprising: obtaining apredetermined number of initial threads associated with an imageprocessing program; testing, under each of one or more distributionmodes, a first processing time for the initial threads in a parallelasynchronous processing mode; determining a longest first processingtime corresponding to a target distribution mode of the one or moredistribution modes; adjusting, based on one or more constraint rules,the first processing time associated with the initial threads under thetarget distribution mode in the parallel asynchronous processing mode;determining a second processing time for each adjusted initial thread ina single thread mode; identifying a thread tuning threshold associatedwith each initial thread based on the second processing time; obtaininga predetermined number of target threads of the image processingprogram, the target threads comprising a first thread for processing animage frame at a first frame rate and a second thread for processing theimage frame at a second frame rate, each target thread of thepredetermined number of target threads corresponding to a respectiveinitial thread; and obtaining an adjusted image processing program bytuning the each target thread under the single thread mode based on acorresponding thread tuning threshold associated with a correspondinginitial thread. 34-44. (canceled)